openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ravi Palacherla <ravi.palache...@oracle.com>
Subject RE: insertable/updatable = false question
Date Fri, 14 Aug 2009 16:16:30 GMT
Hi Laird,

I am not an expert in interpreting the spec , but I think the following points from the spec
may  help

As per JSR 317 

2.2    Persistent Fields and Properties
If property-based access is used and lazy fetching is specified, portable applications should
not directly access the 
entity state underlying the property methods of managed instances until after it has been
fetched by the persistence provider.

3.2.7.1    Merging Detached Entity State
The persistence provider must not merge fields marked LAZY that have not been fetched: it
must ignore such fields when merging.

Regards,
Ravi.

-----Original Message-----
From: ljnelson [mailto:ljnelson@gmail.com] 
Sent: Friday, August 14, 2009 7:47 AM
To: users@openjpa.apache.org
Subject: Re: insertable/updatable = false question


On Thu, Aug 13, 2009 at 7:46 PM, Ravi P Palacherla (via Nabble) <
ml-user+194843-327306094@n2.nabble.com<ml-user%2B194843-327306094@n2.nabble.com>
> wrote:

> I think I found a better solution.
>

Oh, there are plenty of solutions, yes, but I'm more concerned with what is
the intended behavior.  It is indeed true that if I do a refresh I will
reload the entity from the database.  But I can't see from the spec why I
should have to do this.  I would think that the lazy loading machinery would
effectively do this for me (in the case of the e2->e1 relationship).  I
don't see any place in the specification that tells me in this very common
scenario why I need to jump through extra hoops.

Thanks,
Laird

-- 
View this message in context: http://n2.nabble.com/insertable-updatable-%3D-false-question-tp3439111p3445160.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message