openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de.INVALID>
Subject Re: Null field not persisted for Dates
Date Sun, 16 Oct 2016 21:03:15 GMT
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:
https://github.com/struberg/lightweightEE/blob/master/backend-api/src/main/resources/META-INF/persistence.xml#L26

Together with the openjpa-maven-plugin to enhance the classes at build time
https://github.com/struberg/lightweightEE/blob/master/backend-api/pom.xml#L66
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:
https://struberg.wordpress.com/2012/01/08/jpa-enhancement-done-right/


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

txs and LieGrue,
strub





> On Saturday, 15 October 2016, 19:25, Vincenzo D'Aniello <ict.management.trexon@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.
> 

Mime
View raw message