This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 248491 - JPA 2.0 EntityManager and Query API updates
Summary: JPA 2.0 EntityManager and Query API updates
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 270196 (view as bug list)
Depends on: 293816
Blocks: 248291
  Show dependency tree
 
Reported: 2008-09-24 15:36 EDT by Gordon Yorke CLA
Modified: 2022-06-09 10:04 EDT (History)
6 users (show)

See Also:


Attachments
EM API Update (30.87 KB, patch)
2009-01-20 18:44 EST, Darani Yallapragada CLA
no flags Details | Diff
Enhancement to EM API (30.86 KB, patch)
2009-01-24 18:39 EST, Darani Yallapragada CLA
no flags Details | Diff
with changes from the feedback given by Guy (30.68 KB, patch)
2009-01-28 13:45 EST, Darani Yallapragada CLA
no flags Details | Diff
patch to update 'find()','refresh()', and 'setProperty()' methods (22.00 KB, patch)
2009-03-23 02:37 EDT, Darani Yallapragada CLA
no flags Details | Diff
patch to implement new 'find()',refresh()', and 'setProperty()' methods (25.19 KB, patch)
2009-03-23 15:11 EDT, Darani Yallapragada CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gordon Yorke CLA 2008-09-24 15:36:20 EDT
JPA 2.0 added additional EntityManager APIs.  New API was added which allow 'lock modes' to be applied to methods find and refresh.  API was added to allow access to an objects current lock status.  API was added to allow removal of an Entity from the persistence context ( clear(Object entity) ).  Additional miscelanious API was added.

See http://wiki.eclipse.org/index.php?title=EclipseLink/Development/JPA_2.0/entitymanager_updates for details
Comment 1 Darani Yallapragada CLA 2009-01-20 18:44:22 EST
Created attachment 123145 [details]
EM API Update

The patch has the implementation and testing of EM API new features.
Comment 2 Darani Yallapragada CLA 2009-01-24 18:39:38 EST
Created attachment 123653 [details]
Enhancement to EM API

Except for Criteria related features, rest of the new features of EM API has been added and tested .
Comment 3 Darani Yallapragada CLA 2009-01-28 13:45:25 EST
Created attachment 124064 [details]
with changes from the feedback given by Guy
Comment 4 Gordon Yorke CLA 2009-01-28 15:57:33 EST
Not all of the reported properties are supported at the EM level.  Only:
JOIN_EXISTING_TRANSACTION
PERSISTENCE_CONTEXT_REFERENCE_MODE
PERSISTENCE_CONTEXT_CLOSE_ON_COMMIT
PERSISTENCE_CONTEXT_PERSIST_ON_COMMIT
PERSISTENCE_CONTEXT_FLUSH_MODE
ORACLE_PROXY_TYPE
EXCLUSIVE_CONNECTION_MODE
EXCLUSIVE_CONNECTION_IS_LAZY
CONNECTION_POLICY
VALIDATE_EXISTENCE
FLUSH_CLEAR_CACHE

Quite a few revisions have occurred with substantial changes to the format of files since the patched revisions.  Care should be taken when resolving conflicts and checking in the patch.

Otherwise looks ready for check-in.
Comment 5 Gordon Yorke CLA 2009-01-28 16:11:12 EST
Ignore my comment on the supported properties list.  The properties as specified within the patch is correct.
Comment 6 Mitesh Meswani CLA 2009-01-30 17:10:06 EST
Checked in all of JPA 2.0 EntityManager API updates (except those required by Criteria Query) on behalf of Darani. 

The changes are at http://fisheye2.atlassian.com/changelog/eclipselink/?cs=3362

Leaving this issue open for the Criteria Query work. 
Comment 7 Darani Yallapragada CLA 2009-03-10 16:46:08 EDT
I updated the wiki with the latest methods to be implemented in EM API. I am working on implementing those methods.
Comment 8 Darani Yallapragada CLA 2009-03-23 02:37:25 EDT
Created attachment 129564 [details]
patch to update 'find()','refresh()', and 'setProperty()' methods

Implementation of 'PESSIMISTIC' lockmodes, createQuery(CriteriaQuery), getQueryBuilder(), and getMetaModel() are yet to be implemented.
Comment 9 Darani Yallapragada CLA 2009-03-23 15:11:08 EDT
Created attachment 129631 [details]
patch to implement new 'find()',refresh()', and 'setProperty()' methods
Comment 10 Darani Yallapragada CLA 2009-03-24 20:10:40 EDT
CascadeType.Detach is yet to be completed
Comment 11 Mitesh Meswani CLA 2009-03-25 22:47:23 EDT
Checked in a patch on behalf of Darani. http://fisheye2.atlassian.com/changelog/eclipselink/?cs=3779
Please note that the implementation of detatch() needs to updated to take into account CascadeType.DETACH
Comment 12 Gordon Yorke CLA 2009-04-01 11:35:13 EDT
This bug was intended to cover the new Query APIs like getSupportedHints() and getHints().

The Wiki pages should be the guides on what should be implemented.
Comment 13 Tom Ware CLA 2009-04-01 13:17:22 EDT
*** Bug 270196 has been marked as a duplicate of this bug. ***
Comment 14 Gordon Yorke CLA 2009-04-01 15:44:49 EDT
Additionally an open issue with em.detach() is that triggered indirection on a detached instance for mappings marked as CascadeType.DETACH must return detached instances as well.  Currently those instances would be managed as would be expected for non CascadeType.DETACH mappings.
Comment 15 Doug Clarke CLA 2009-04-08 15:09:39 EDT
Changing priority to P@ since JPA 2.0 features are required for the 2.0 release
Comment 16 Gordon Yorke CLA 2009-10-30 13:43:03 EDT
Initial development completed
Comment 17 Eclipse Webmaster CLA 2022-06-09 10:04:50 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink