Possible Bug in MEMBER OF

#1

Hello!

I maybe found another bug in version 2.3.3.

I'll send you a test DB via support ticket.

Try the following query in explorer:

SELECT u FROM Unit u WHERE :user MEMBER OF u.users

Set user to TrackerUser#8

If i run this quey i get:

Invalid operand type at.co.pjm.tracker.persistence.TrackerUser for operator MEMBER OF
SELECT u FROM Unit u WHERE :user MEMBER OF u. ==> users <==

In my opinion the result should be Unit#4004

Thanks for your help.

#2

It seems that inverse (mapped by) collection fields where only supported in the FROM clause (With JOIN) but not in the WHERE clause. Build 2.3.3_01 provides a temporary fix that makes your query work.

Still SIZE and IS EMPTY are not supported yet and this should be fixed in future versions.

ObjectDB Support
#3

Thanks for the fix. Now it works.

I hope you add comprehensive support for inverse collection fields in the next release. It's a pretty basic feature every JPA implementation should have.

Reply