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 <[email protected]> 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:[email protected]

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

Reply via email to