I'm trying to add an extra column, using binding file to a model obtained from a xsd (a big one). The added field need to be persisted, but not serialized.
I tried with hj:generated-property
but it does nothing with it.
To give a sample of what I tried so far, I tested using PO Sample from git sources on tag 0.6.0 ejb/tests/po-customized and I added this to bindings...
bindings.xjb
...
<jaxb:bindings node="xs:complexType[@name='PurchaseOrderType']">
<hj:entity>
<orm:table name="po"/>
<!-- adding creation timeStamp -->
<hj:generated-property name="creationTimestamp" propertyName="creationTimestamp" propertyQName="creationTimestamp"
propertyKind="xs:dateTime" />
</hj:entity>
</jaxb:bindings>
...
When running mvn clean test
, PurchaseOrderType doesn't have the new field. Tests run with no errors.
Is it possible to add a field like this?