Bug 402109 - EntityManager.merge() returns non-persistene object
Summary: EntityManager.merge() returns non-persistene object
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P2 major with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-01 05:40 EST by Atul Acharya CLA
Modified: 2022-06-09 10:36 EDT (History)
2 users (show)

See Also:


Attachments
Complete maven project for the test. (6.14 KB, application/x-zip-compressed)
2013-03-01 05:40 EST, Atul Acharya CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Atul Acharya CLA 2013-03-01 05:40:11 EST
Created attachment 227785 [details]
Complete maven project for the test.

Environment:
  Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
  Apache Maven 3.0.4 (r1232337; 2012-01-17 14:14:56+0530) 

I have an entity 'Person', with field 'name' marked as @Column(..., updatable=false). If I change the value (with setName(...), and then try to merge the object, merge returns me an object with the updated value, but no 'UPDATE' statement is executed. This is correct, merge is ignoring 'name' field, bucause of 'update=false'. The bug is in what it returns. It is returning an object which never persisted, nor will it ever persist.

In this case merge needs to return me object with NO changes to 'name' field.


Complete test-project is attached.

Reproducibility : Always
Comment 1 Tom Ware CLA 2013-04-03 09:04:26 EDT
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:36:14 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink