openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: unmanaged exception
Date Wed, 23 Dec 2009 19:03:10 GMT
Hi,

I surmise that you're using an automatically generated id for "a",  
otherwise accessing the id field would not normally trigger a database  
access.

But I also suspect that the real issue is that the unmanaged entity is  
not being handled properly...

Craig

On Dec 23, 2009, at 8:01 AM, Daryl Stultz wrote:

> On Wed, Dec 23, 2009 at 10:42 AM, Daryl Stultz <daryl@6degrees.com>  
> wrote:
>
>> So it seems I should at least not be referencing the id of "a"  
>> until after
>> the commit.
>>
>
> While this may have prevented this particular exception (or maybe it  
> would
> have happened upon commit anyway), I can't see that referencing the  
> id of a
> newly persisted entity before commit is a bad coding practice.  
> Anyone have a
> different opinion?
>
> -- 
> Daryl Stultz
> _____________________________________
> 6 Degrees Software and Consulting, Inc.
> http://www.6degrees.com
> mailto:daryl@6degrees.com

Craig L Russell
Architect, Sun Java Enterprise System http://db.apache.org/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message