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
Whether a column needs any post processing after an INSERT (or an UPDATE too for that matter) really ought to be implemented by the ColumnMapping, but also defined on the JavaTypeMapping. Currently it is dumped onto MappingCallbacks even though it is unlike the other handling on MappingCallbacks (relationships etc).
Consequently we could create 2 interfaces
public interface ColumnMappingPostInsert
{
void insertPostProcessing(Object value);
}
public interface ColumnMappingPostUpdate
{
void updatePostProcessing(Object value);
}
Similarly the owning JavaTypeMapping would need to implement something similar, since that is the only place that can provide the value for each ColumnMapping (e.g jts.GeometryMapping, OracleSerialisedPCMapping) and any XXXColumnMapping that requires to perform post processing after an INSERT or UPDATE should implement whichever it needs. The arguments passed in to these methods may need expanding as we come across use-cases.
Prime example of this requirement is the Oracle CLOB/BLOB handling. Potentially usable for PostgreSQL "large object" feature.
We then need to modify InsertRequest and UpdateRequest to put in calls to all affected columns that are INSERTed or UPDATEd.
andyjefferson
changed the title
Move "insertPostProcessing" from MappingCallbacks to own interface, and on ColumnMapping
Move "insertPostProcessing" from MappingCallbacks to own interface, same for "updatePostProcessing"
Mar 11, 2021
andyjefferson
changed the title
Move "insertPostProcessing" from MappingCallbacks to own interface, same for "updatePostProcessing"
Move "insertPostProcessing" from MappingCallbacks to own interface, also for updates
Jun 28, 2021
Whether a column needs any post processing after an INSERT (or an UPDATE too for that matter) really ought to be implemented by the ColumnMapping, but also defined on the JavaTypeMapping. Currently it is dumped onto MappingCallbacks even though it is unlike the other handling on MappingCallbacks (relationships etc).
Consequently we could create 2 interfaces
Similarly the owning JavaTypeMapping would need to implement something similar, since that is the only place that can provide the value for each ColumnMapping (e.g jts.GeometryMapping, OracleSerialisedPCMapping) and any XXXColumnMapping that requires to perform post processing after an INSERT or UPDATE should implement whichever it needs. The arguments passed in to these methods may need expanding as we come across use-cases.
Prime example of this requirement is the Oracle CLOB/BLOB handling. Potentially usable for PostgreSQL "large object" feature.
We then need to modify InsertRequest and UpdateRequest to put in calls to all affected columns that are INSERTed or UPDATEd.
Affected JavaTypeMapping classes are
geospatial : jts/GeometryMapping
rdbms : OracleBitSetMapping, OracleSerialisedObjectMapping, OracleSerialisedPCMapping, OracleStringLobMapping
Affected ColumnMapping classes are
rdbms : OracleBlobColumnMapping, OracleClobColumnMapping,
The text was updated successfully, but these errors were encountered: