Hi Vincenzo!

No worries, your english is fine. 

The writeExternal is invoked to serialize away the entity. Whether the receiver 
side gets just the normal entity fields (unenhanced so to say) or also the 
_loaded and _dirty fields is a question of the configuration. 

I usually use the following setup:

Together with the openjpa-maven-plugin to enhance the classes at build time
I should clean up the connection section config. That's a left over from many 
years back. But it should basically work.

I've wrote up a bit about enhancement strategies many years ago, maybe it helps:

Do you have a small sample which we can use to reproduce the problem?

txs and LieGrue,

> On Saturday, 15 October 2016, 19:25, Vincenzo D'Aniello 
> <ict.management.tre...@gmail.com> wrote:
> > Hi, i've set this property in the persistence unit:
> <property name="openjpa.DetachState" 
> value="loaded(DetachedStateField=true)"/> 
> but when the entity object try to be detached, an exception
> NoSuchMethodException is thrown because openjpa try to execute the
> writeExternal method on the entity class object.
> I have not understand abaut enhancer, Enhancement. There is a complete
> example how do remote ejb call with ejb entity beans?
> I use Tomee 1.7.4 naturally with openejb, openjpa, sorry for my english.
> --
> View this message in context: 
> http://openjpa.208410.n2.nabble.com/Null-field-not-persisted-for-Dates-tp5993519p7589809.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to