Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
objectstore-jdo-1.4.1
-
None
Description
As per query to Andy Jefferson:
> I also implemented the TypeConverter interface for Blob and Clob;
> but I'm not sure how DN actually uses it. Can you enlighten me?
If the user has specified to use a TypeConverter on a field
http://www.datanucleus.org/products/accessplatform/jdo/types.html#typeconverter
then it will select TypeConverterMapping for that field (the log should say).
This has the TypeConverter internally, and will handle creation of the
required column (for the datastore type of the converter), and automate the getObject/setObject of the XXXMapping that you would have had to write if you had written the Mapping class manually.
https://github.com/datanucleus/datanucleus-rdbms/blob/3.2/src/java/org/datanucleus/store/rdbms/mapping/java/TypeConverterMapping.java
On a persist, the setObject is called, passing through the converter. On a
fetch the getObject is called, passing through the converter.
In DN 4.0, there is even less need to provide the XXXMapping classes, adding on TypeConverterMultiMapping so for cases like your multi-column Blob it may be possible to do it just via a (different) converter (with multiple columns).
Attachments
Issue Links
- is related to
-
WICKET-5600 Introduce CharSequenceResource similar to ByteArrayResource
- Resolved
-
CAUSEWAY-794 Upgrade to Wicket 6.16.0, remove CharSequenceResource
- Closed
- relates to
-
CAUSEWAY-794 Upgrade to Wicket 6.16.0, remove CharSequenceResource
- Closed