Bug 293755 - After the transaction has begun, UnitOfWork.getOriginalVersionOfObject() returns an empty clone if the object isn't in the parent session cache.
Summary: After the transaction has begun, UnitOfWork.getOriginalVersionOfObject() retu...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-30 03:05 EDT by Will Butler CLA
Modified: 2022-06-09 10:19 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Will Butler CLA 2009-10-30 03:05:18 EDT
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4
Build Identifier: 1.1.2

After the transaction begins, there are some cases where we will execute queries against the unit of work to get back a list of clones. These objects may or may not be in the cache in the parent session. If we call UnitOfWork.getOriginalVersionOfObject() with one that is not in the cache, we are returned back an empty clone with no contents. We are currently working around it by running another query against the parent session to get the object if it comes back empty. 

Reproducible: Always

Steps to Reproduce:
1. Start with an empty cache.
2. Start transaction.
3. With unit of work, execute a query to return some clones.
4. Call getOriginalVersionOfObject with one of the clones.
5. Examine contents of the returned value.
Comment 1 Tom Ware CLA 2009-11-05 13:35:09 EST
Setting target and priority.  See the following page for a description of what these values mean.

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:19:37 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink