Hi,

I am working on the support of Dependent Value Classes.

The implementation is rather simple: if a binding is not explicitely defined for a CMP field class (see org.tranql.sql.jdbc.binding.BindingFactory) and if the class implements Serializable, then one assumes that the CMP field is a Dependent Value Class. Such CMP fields are stored into BLOB columns.

The serialized object is stored into the BLOB via the PreparedStatement.setBinaryStream(int parameterIndex, java.io.InputStream x, int length) method. As a matter of fact, this works with Derby. Yet, it seems that this is not the "correct" way. More accurately, it seems that PreparedStatement.setBlob (int i, Blob x) is the "correct" way.

Anyone knows if PreparedStatement.setBinaryStream is portable?

Thanks,
Gianny

Reply via email to