Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312010 - WDF tests assume that persistent id is available right after persist
Summary: WDF tests assume that persistent id is available right after persist
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 trivial (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL: http://wiki.eclipse.org/Talk:EclipseL...
Whiteboard: test simple_fix
Keywords:
Depends on:
Blocks: 309681
  Show dependency tree
 
Reported: 2010-05-07 03:22 EDT by Adrian Goerler CLA
Modified: 2022-06-09 10:25 EDT (History)
2 users (show)

See Also:


Attachments
proposed patch (4.72 KB, patch)
2010-05-07 09:09 EDT, Adrian Goerler CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Goerler CLA 2010-05-07 03:22:05 EDT
The WDF tests assume that the persistent id is available right after the persist operation. The reasoning for this is deduced from the specification as follows:

§3.2.2 Persisting an entity instance: 
A new entity instance becomes both managed and persistent by invoking the persist method on it. 

§3.2 Entity Instance’s Life Cycle
A managed entity instance is an instance with a persistent identity that is currently associated with a persistence context.

In EclipseLink however, the interpretation seems to be that the persist operation ensures that an entity will *eventually* get a persistent identity upon the flush operation.
an entity the "persistent identity"
Comment 1 Adrian Goerler CLA 2010-05-07 09:09:24 EDT
Created attachment 167466 [details]
proposed patch 

Proposed patch for TestIdentity -> do a flush after persist

Tested on MySQL -> OK
Comment 2 Adrian Goerler CLA 2010-05-07 10:27:25 EDT
checked in at # 7178
tested on MySQL
reviewed by Andreas
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:17:13 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:25:39 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink