Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311868

Summary: WDF test TestRefresh needs to be adapted to clarified semantics of refresh operation according to § 3.2.5
Product: z_Archived Reporter: Adrian Goerler <adrian.goerler>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: trivial    
Priority: P3 CC: eclipselink.orm-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
URL: http://wiki.eclipse.org/Talk:EclipseLink/Bugs/309681#testRefreshDeleted
Whiteboard: test
Bug Depends on:    
Bug Blocks: 309681    
Attachments:
Description Flags
patch for method testRefreshDeleted none

Description Adrian Goerler CLA 2010-05-06 08:49:28 EDT
The JPA 2 specification clarifies the semantics of the refresh operation:

§3.2.5: 

The semantics of the refresh operation, applied to an entity X are as follows:
[...]
If X is a new, detached, or removed entity, the IllegalArgumentException is thrown.

So far, the test TestRefresh assumed that refresh should work on removed entities as well. It has to be adjusted to the clarified spec.
Comment 1 Adrian Goerler CLA 2010-05-06 09:40:02 EDT
Created attachment 167304 [details]
patch for method testRefreshDeleted

Adjust the test to conform with the JPA 2.0 spec.
Comment 2 Adrian Goerler CLA 2010-05-06 09:42:54 EDT
checked in at # 7172
reviewed by Andreas
tested on MySQL
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:15:17 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:36:04 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink