Vincent Cornet edited a comment on Bug HHH-7889

The issue is not as trivial to solve as I thought...

I'm trying to find a way to use CharacterStreams, but I'm stuck at some point: org.hibernate.engine.jdbc.internal.CharacterStreamImpl needs a well-known data length, but when getting the data from java.sql.ResultSet.getCharacterStream(..), one cannot know it without actually reading the data - which is precisely what one would not want when using streams in the first place.

One way to work around this is to use a dummy or placeholder value (e.g. -1L). Could this be a bad idea? I found that in the Blob counterpart (BlobTypeDescriptor), the InputStream.available() method is used to provide this length value. Since it is not accurate either...

I lack insight about lob-related internal mechanisms to go further. Any thoughts?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira