Thank you for your reply. The fact is that yet we must switch from Relational to NoSQL, if also I must understand tricky parts of a JPA engine that behave differently from all the others, well, then I think I'll switch to Objectify or something like this....
On 19 Mag, 11:26, Ravi <ping2r...@gmail.com> wrote: > Just to put my 2 cents... > Even in JDO same thing happening. I got frustrated first but then i > just accepted it/ignored it(5-6 months back)...that may be they wont > fix it or they are not able to do it on GAE... But yes you are right > frameworks like Hibernate does provide key as soon as you call the > persist/save method and doesn't wait for commit call. > > And i hope datanucleus(id) is not the official representative of Data > Nucleus framework/company, and if that is the case then it is sad that > such harsh reply are coming from official representative. I have never > seen such reply from google guys, we ask so basic/absurd/stupid/naive > questions all the time and they always reply politely and definitely > don't end the discussion with END. > > Ravi. > > On May 19, 7:06 am, Luca <luca.mas...@gmail.com> wrote: > > > > > > > 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 > > 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 > 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.