users@jpa-spec.java.net

[jpa-spec users] [jsr338-experts] Query.setLockMode

From: Linda DeMichiel <linda.demichiel_at_oracle.com>
Date: Thu, 17 Jan 2013 14:29:05 -0800

Query.setLockMode currently states:

"@throws IllegalStateException if the query is found not to be
* a Java Persistence query language SELECT query
* or a Criteria API query"

To be consistent with the JPQL semantics, this should be restated as

"@throws IllegalStateException if the query is found not to be
* a Java Persistence query language SELECT query
* or a CriteriaQuery query"

I.e., we disallow setting query lock modes for update and delete "queries"

I plan to make this change, so yell now if you disagree.

thanks,

-Linda