JPQL 2.0 introduces the ability define FROM variables for map keys and values.
Currently ObjectDB supports FROM variables for collection elements.
FROM variables for map keys and values are expected to be supported in future versions.
Type: Feature Request | Version: 2.0.0 | Priority: Normal | Status: Active | Replies: 7 |
JPQL 2.0 introduces the ability define FROM variables for map keys and values.
Currently ObjectDB supports FROM variables for collection elements.
FROM variables for map keys and values are expected to be supported in future versions.
Any updates on this issue ?
Hi,
I've tested both KEY and VALUE statements with JPQL with the latest version of ObjectDB 2.3.7.
It seems to me they are not supported.
Query :
"SELECT s FROM Session s JOIN s.data d WHERE VALUE(d) = :value"
Object : public class Session implements Serializable { ... @ElementCollection(fetch = EAGER) @Column(name = "DATA_VALUE") @MapKeyColumn(name = "DATA_KEY") @JoinFetch(INNER) private Map<String,String> data; }
Error : Stacktrace:] with root cause com.objectdb.o.UserException: Unexpected query token 'VALUE' at com.objectdb.o.MSG.d(MSG.java:61) at com.objectdb.o.TKN.J(TKN.java:765) at com.objectdb.o.QSP.E(QSP.java:484) at com.objectdb.o.QSP.A(QSP.java:250) at com.objectdb.o.QSP.y(QSP.java:127)
The VALUE keyword is indeed unsupported yet.
Try:
SELECT s FROM Session s JOIN s.data d WHERE d = :value
That works.
Please let us know when/if the KEY and VALUE keywords are supported.
Best regards,
./M
Any updates on this issue ?
Best regards,
Mark
No news yet regarding this issue, unfortunately.