Ok it was what I wanted, an example of the most comprehensive jpa enhancement
applied to OpenJPA.
I missed the part of the plug-in OpenJPA in maven, and so everything is
clear.
Now for reasons of time, I settled with the java reflections, but when I
have some time I'll try with this solution, and
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
Hi, i've set this property in the persistence unit:
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 comp
Hi,
I have tried and it worked fine. but the problem is if i want to
update on field, for that in persistenceObject i populate one field, rest
are null. it will cause problem. Do we have any solution to apply this
behavior on specific field instead of complete JPA entities.
I have tried below c
I tested with this piece of code and it works:
//modified is the instance client had changed
Record modified = (Record) processClientRequest();
EntityManager em = emf.createEntityManager();
Record merged = (Record) em.merge(modified);
//assume begin is a date and client set the date to null, updat
_dirty and _loaded bits should be set.
LieGrue,
strub
--- On Sun, 2/6/11, No1UNo wrote:
> From: No1UNo
> Subject: Re: Null field not persisted for Dates
> To: users@openjpa.apache.org
> Date: Sunday, February 6, 2011, 4:42 AM
>
>
> On Feb 4, 2011, at 2:13 PM, Jerry Carter
On Feb 4, 2011, at 2:13 PM, Jerry Carter wrote:
> Am I right is assuming that null values should be copies on merge? I've
> reviewed the JPA 2.0 specification. I see that 3.2.7.1 does not disadvantage
> null values
>> If X is a detached entity, the state of X is copied onto a pre-existing
>>
se @Inheritance. See
OPENJPA-1912 for more info [1].
LieGrue,
strub
[1] https://issues.apache.org/jira/browse/OPENJPA-1912
--- On Fri, 2/4/11, Rick Curtis wrote:
> From: Rick Curtis
> Subject: Re: Null field not persisted for Dates
> To: users@openjpa.apache.org
> Date: Friday, F
Rick:
First of all, thank you very much for the quick response and definitive answer.
Am I right is assuming that null values should be copies on merge? I've
reviewed the JPA 2.0 specification. I see that 3.2.7.1 does not disadvantage
null values
> If X is a detached entity, the state of X i
Jerry -
That would be the problem then. We lost track of the fact that you set this
field to null, and assume that it wasn't loaded. Please review the
openjpa.DetachState [1] docs for more info. You could set the property
listed below so that we will stream our DetachedStateManager around.
[1]
Yes, it is. The object is changed remotely and then merged. The data on the
wire is fine.
On Feb 4, 2011, at 1:47 PM, Rick Curtis [via OpenJPA] wrote:
> Jerry -
>
> Is the Entity which you are trying to update being serialized/deserialized?
>
> Thanks,
> Rick
>
> On Fri, Feb 4, 2011 at
Jerry -
Is the Entity which you are trying to update being serialized/deserialized?
Thanks,
Rick
On Fri, Feb 4, 2011 at 12:25 PM, Jerry Carter wrote:
> Using OpenJPA 2.0.1, I have a date field in my entity. Setting the field
> to a non-null value causes the data to be persisted as one would e
12 matches
Mail list logo