Hi, > such that I could tag a field with a custom-defined property-value pair and retrieve it?
Yes you can. At meta-level, you can mark a Field carrying implementation specific data. See FieldMetaData.usesImplData(); At an instance level every element can be attached with a 'user object' which is opaque to OpenJPA runtime. > For example, in our current legacy code, we have the idea of a "hidden" > property. I would like to be > able to retrieve this when looping through the fields in order to > correctly transform the data to > our existing legacy structures. The other option (which is simpler) is to use Externalizer support that annotates a field with a pair of conversion functions to translate between in-memory and data store representation. A more involved approach in to write custom value handlers. Both of them (externalizer and custom value) are adequately documented in OpenJPA documentation. Regards -- Pinaki Heather Sterling wrote: > > > > Hi, > > I was wondering how to retrieve the possible enum values from a > FieldMetaData structure. > > I also wanted to know if there's a way to get other information, such as > the length of a field. (specified with @Column annotation). I assume > there > is, but I could not find it. > > Lastly, is there a way to extend the metadata, such that I could tag a > field with a custom-defined property-value pair and retrieve it? I saw > that there are some extension APIs on FieldMetaData, but I'm not sure what > the purpose of those are. For example, in our current legacy code, we > have > the idea of a "hidden" property. I would like to be able to retrieve this > when looping through the fields in order to correctly transform the data > to > our existing legacy structures. > > Thanks, > > Heather Sterling > Systems Management Development > Phone: 919-254-7163 T/L: 444-7163 > Cell: 919-423-3143 > Email: hst...@us.ibm.com > -- View this message in context: http://n2.nabble.com/FieldMetaData-questions-tp2455854p2456113.html Sent from the OpenJPA Users mailing list archive at Nabble.com.