You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oracle (for storing large amounts of data, offline, in a BLOB column) requires some whacky process of inserting EMPTY_BLOB() on an INSERT and then retrieving and setting the actual value of the BLOB field. This is only implemented for tables of classes currently, and not for join tables.
v6.0 updates means that we have OracleCollectionMapping and the element mapping would be such as OracleBlobColumnMapping (in the join table). The add element of the backing store fires off any INSERT (or UPDATE if it was to do one). This would need to call mapping.performSetPostProcessing(...).
The difficult part of this is tied to OracleBlobColumnMapping.setPostProcessing (and equivalent Clob method). This needs to do SELECT {blob} FROM join_tbl WHERE ID = ?
but with a join table we don't have an "id", we have the owner, but that only restricts to all elements of the collection. We also (may, with an indexed List) have an index column. We need to restrict to a particular element of the collection (or particular key/value of the map).
Note that we could allow a BLOB to store less than 4k bytes (?) by just putting the value into the INSERT statement, but why use a BLOB in that case?
The text was updated successfully, but these errors were encountered:
Sample test that shows a simple field persisted as CLOB (passes), Collection field persisted (serialised) as BLOB (passes), and Collection field persisted into JOIN table with CLOB element (fails). test.zip
update post processing into setPostProcessing(...) on JavaTypeMapping,
and add specific callback in UpdateRequest rather than just dumping it
into postUpdate. Remove MappingCallbacks from some of the Oracle type
mappings that don't need any actual relationship management (what
MappingCallbacks is intended for). Add placeholder for setPostProcessing
on OracleCollection/OracleMap/OracleArray for when we want to handle
BLOB/CLOB in a join table (#14).
Fixes#365.
Oracle (for storing large amounts of data, offline, in a BLOB column) requires some whacky process of inserting EMPTY_BLOB() on an INSERT and then retrieving and setting the actual value of the BLOB field. This is only implemented for tables of classes currently, and not for join tables.
v6.0 updates means that we have OracleCollectionMapping and the element mapping would be such as OracleBlobColumnMapping (in the join table). The add element of the backing store fires off any INSERT (or UPDATE if it was to do one). This would need to call mapping.performSetPostProcessing(...).
The difficult part of this is tied to OracleBlobColumnMapping.setPostProcessing (and equivalent Clob method). This needs to do
SELECT {blob} FROM join_tbl WHERE ID = ?
but with a join table we don't have an "id", we have the owner, but that only restricts to all elements of the collection. We also (may, with an indexed List) have an index column. We need to restrict to a particular element of the collection (or particular key/value of the map).
Note that we could allow a BLOB to store less than 4k bytes (?) by just putting the value into the INSERT statement, but why use a BLOB in that case?
The text was updated successfully, but these errors were encountered: