I have a small CMP question pertaining to converting a java object into a BLOB in a database.
I have an entity bean that has three attributes which are complex java objects(i.e. not String or int). The complex object basically wraps two long attributes and has setters and getters for the two long attributes. The column in the database to which I'm attempting to write this object is a BLOB(16). The 16 bytes in the database represent a concatination of the two longs. Is there a way using CMP that when the container attempts to persist the complex object, the 16 bytes are written to the database instead of a serialized version of the complex object? Likewise when the bean is created by the container it will have to read the 16 bytes from the db and instantiate my complex object.
Obviously I can do this easily enough using BMP, but was hoping that I could use CMP.
I'm afraid not.
You might want to look at using a DVC to map your object to two columns in the database.