I've only taken a quick look at this issue, but the doc for getDirtyObjects() suggests that they should be managed instances. If they are managed instances then the state should either be available immediately or will be fetched when you call the appropriate get method.
If you have a testcase that demonstrates the behavior I'd be happy to take a look (when I get a few free cycles). -mike On Mon, Mar 2, 2009 at 7:50 AM, yoavsc <[email protected]> wrote: > > Hello, > > I use the getDirtyObjects() method of the OpenJPAEntityManager to get a > collection of dirty objects. > > I have a problem with new objects: > After I commit the transaction, every field (except for the id one) of all > new entities in the dirty objects collection has a null value. > > (The objects in the collection are the same ones, but all their values are > nullified) > > I need the object to have the correct values in order to send an event > containing the new entity. > > Is it a bug or an intended behaviour? > > I could bypass the problem by asking the entity manager to fetch the > entities (because the id field was not nulled). Is that the right way to > avoid my problem? > > Yoav > -- > View this message in context: > http://n2.nabble.com/dirty-objects-state-after-a-commit-tp2409237p2409237.html > Sent from the OpenJPA Developers mailing list archive at Nabble.com. > >
