Using hibernate to store bytes of data (such as byte []) to Oracle, you cannot use quot; privatebyte [] contentquot; when defining object.
Using hibernate to store bytes of data (such as byte []) to Oracle, you cannot use quot; private byte [] contentquot; when defining object.
Using hibernate to store data of the byte type (such as byte []) to Oracle, you cannot use "private byte [] content" when defining an object. I have tried this definition, when storing data (session. save (user) is correct, but the problem occurs when reading Blob fields (the byte [] stored in Oracle uses the "BLOB" type, the read is garbled.
When reading Blob fields using hibernate, the object (corresponding byte [] Type field) should be defined as follows:
Corresponding hibernate file Configuration:
How to read Blob data:
About input and output streams
The read-in stream must naturally have a read source, and the output must also be output to a certain place. The output usually needs to be read first. Here, the input and output are connected to a buffer in the memory byte array. in this way, the database reads the array, and the output stream is output from this array to a specific file format.
,