End ???? Very kind from you !! And you haven't asked twice.

Anyway I will be back on the main argument that is the fact that I
think DataNucleus is not working like all other JPA engines.

Those lines you reports only says that flush synchronize the state to
the underling database, nothing strange on that, is the behaviour I
expect. And regarding the "footnote" I think that this is a very
subtle case.

I'm talking about a simple code like

                        tx.begin();

                        Luogo luogo = new Luogo();
                        luogo.setDescrizione("Ulisse Dini");
                        em.persist(luogo);

                        System.out.println("Luogo Key: "+luogo.getKey());

                        tx.commit();

there "null" will be printed only by DataNucleus, so that I have to
design my code in a way specific to that persistence provider. If this
is what you desire, well, you are sure in the right way.

And also notice that the reference implementation (EclipseLink) works
the way I expect, so please take a look at it.

On May 19, 7:26 am, datanucleus <andy_jeffer...@yahoo.com> wrote:
> I've already asked you twice to post your class. You haven't. That
> provides no context for any comment, and I've already told you why
> datastore operations are delayed until commit/flush. Why do you think
> there's a flush() method if you think things ought to go straight to
> the datastore ?
>
> JPA2 spec page 29 footnote 12.
> <spec>[12] If the application does not set the primary key attribute
> corresponding to the relationship, the value of that attribute may not
> be available until after the entity has been flushed to the database.</
> spec>
>
> <spec>/**
> * Synchronize the persistence context to the underlying database.
> * @throws PersistenceException if the flush fails
> */
> public void flush();</spec>
>
> <spec>• If X is a new entity, it becomes managed. The entity X will be
> entered into the database at or
> before transaction commit or as a result of the flush operation.</
> spec>
>
> http://www.datanucleus.org/products/accessplatform/jpa/transaction_ty...
>
> End.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-appengine-java?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to