Query with MEMBER OF on hash map values

#1

Hello,

we want to execute following query:

SELECT tc FROM TC tc WHERE ?1 MEMBER OF tc.testMacros.values()

But we get an internal ObjectDB exception.

It is possible to implement a query for this case at all?

 

@Entity
public class TC {

     @OneToMany
     Map<String, Macros> testMacros = new HashMap();

}

 

#2

Could you please post the exception and its stack trace?

ObjectDB Support
#3

It was Error 990.

#4

To examine this error we would need the stack trace of the exception, if not a full runnable test case.

But before proceeding further please try an alternative query:

SELECT tc FROM TC tc WHERE tc.testMacros.containsValue(?1)
ObjectDB Support
#5

Thank you, it works fine.

Reply