ObjectDB ObjectDB

Issue #13: JPQL support for Maps (JPA 2.0)

Type: Feature RequestVersion: 2.0.0Priority: NormalStatus: ActiveReplies: 7
#1

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.

ObjectDB Support
edit
delete
#2

Any updates on this issue ?

edit
delete
#3

Actually map values are now supported but not map keys.

ObjectDB Support
edit
delete
#4

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)

 

 

edit
delete
#5

The VALUE keyword is indeed unsupported yet.

Try:

SELECT s FROM Session s JOIN s.data d WHERE d = :value
ObjectDB Support
edit
delete
#6

That works. 
Please let us know when/if the KEY and VALUE keywords are supported.

Best regards,
./M

edit
delete
#7

Any updates on this issue ?

Best regards,

Mark

edit
delete
#8

No news yet regarding this issue, unfortunately.

ObjectDB Support
edit
delete

Reply

To post on this website please sign in.