I did some more tests, printing the key IMMEDIATELY AFTER the
em.persist and these are the results:

- OpenJPA (1.0.1): key assigned
- EclipseLink (1.0.1): key assigned

this with the results of yesterday's tests:

- Hibernate (3.4.0.GA): key assigned
- DataNucleus (1.1.5): key null

Two considerations on this:
1) Passing the TCK but being disaligned from the behavious of other
Persistence Provider is not a good thing, people, like me, work with
such engine and learn to do things in some ways.
2) At least this must sound like a warning for DataNucleus team.

Being this the scenario I think that you should file a bug on this, or
at least an enhancment.

L.

On May 18, 9:09 pm, datanucleus <[email protected]> wrote:
> 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 [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to