So i need to make Usertype with this? On Mar 7, 10:26 pm, Noel Grandin <[email protected]> wrote: > ps.setBinaryStream(new ByteArrayOutputStream(ayBytes)); > > > > > > > > On Wed, Mar 7, 2012 at 22:20, Kasja <[email protected]> wrote: > > But how exactly? How to make Hibernate use this ps when saving blobs? > > I've been trying to solve this for a week, help me, please. > > > On Mar 7, 10:54 am, Noel Grandin <[email protected]> wrote: > > > yes > > > > On 2012-03-03 09:53, Kasja wrote: > > > > > Hi. From h2 documentation: "If it is possible that the objects don't > > > > fit into memory, then the data type CLOB (for textual data) or BLOB > > > > (for binary data) should be used. For these data types, the objects > > > > are not fully read into memory, by using streams. To store a BLOB, use > > > > PreparedStatement.setBinaryStream. To store a CLOB, use > > > > PreparedStatement.setCharacterStream. To read a BLOB, use > > > > ResultSet.getBinaryStream, and to read a CLOB, use > > > > ResultSet.getCharacterStream. ". > > > > Now, i have an entity with "byte[] file;" property. Can i use those > > > > prepared statements to save this bytea into db, because i have very > > > > limited memory? bytea comes from a large xml; H2 is in embedded mode. > > > -- > > You received this message because you are subscribed to the Google Groups > > "H2 Database" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > >http://groups.google.com/group/h2-database?hl=en.
-- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
