Define your class first, since without a context there is no point to this.
JPA uses optimistic txns *only* and so nothing should go in the datastore before flush(). Nothing. Any implementation that does put something in the datastore before then is actually problematic since it can cause optimistic versioning problems. An object being attributed in the datastore (which is what IDENTITY GeneratedValue type is) cannot have an identity *value* until it is flushed since it isn't *persistent* until then. And while you're at it you can run DataNucleus against H2. You should not have the guarantee to view the identity of a not-yet- persistent object until it is persistent. And not flushed is not persistent. -- 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.