Community
Participate
Working Groups
Build Identifier: 2.0.1.v20100213-r6600 The following code does a join on 2 tables and tries to get an entity object returned that is locked. It does not result in a locked row on the account table but I think it should. public static Account getLockedAccount(EntityManager em, String id, String type) { Query q = em.createNativeQuery("select A.* from account A, account_mapping M where M.identifier=? and M.identifier_type=? and M.account_id=A.account_id", Account.class); q.setParameter(1, id); q.setParameter(2, type); q.setLockMode(LockModeType.PESSIMISTIC_READ); Account acc = (Account) q.getSingleResult(); return acc; } Reproducible: Always Steps to Reproduce: 1. Run similar code as provided 2. 3.
It is a good idea to go through one of the various support mechanisms before filing a bug. (users mailing list or the newsgroup) The audience is fairly wide and the chance of you getting feedback about what is going wrong, whether it is a bug and a workaround is very good. The feedback for items entered in the bug database will be slower.
Thanks, I found a workaround by not doing a join and its fine. I logged the bug merely as a means for future improvement of the stack.
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.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink