Issue Details (XML | Word | Printable)

Key: NUCRDBMS-23
Type: Task Task
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Andy Jefferson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

Oracle : support writing BLOB columns in join tables

Created: 19/Jul/06 02:23 PM   Updated: 25/May/08 09:06 AM
Component/s: Types
Affects Version/s: None
Fix Version/s: None

Datastore: Oracle


 Description  « Hide
Oracle requires some whacky process of inserting EMPTY_BLOB() on an INSERT and then doing a postInsert() setting the actual value of the BLOB field. This is only implemented for tables of classes currently, and not for join tables.

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 19/Aug/07 04:27 PM
Process to generate OracleStringMapping when the element is a String stored as BLOB in join table is in CVS HEAD.

Remaining work :-
1. Change MappingCallbacks postInsert, postUpdate to take in the value of the BLOB/CLOB field. This is necessary because currently the postInsert, postUpdate try to retrieve the value from the object but since we have a Collection/Map/array then we don't know which element was just inserted/updated.
2. Change all org.jpox.store.rdbms.scostore methods that insert/update data in the datastore and one (or more) of the mappings implement MappingCallbacks.

Andy Jefferson added a comment - 19/Aug/07 05:38 PM
The difficult part of this is tied to OracleBlobRDBMSMapping.updateBlobColumn (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 have an index column (if the table just happens to contain one). We need to restrict to a particular element of the collection (or particular key/value of the map)