ObjectDB ObjectDB

fetch by enum

#1

I have Entity named Fruits  with a column Type which is a enum. I want to fetch the based on Type 

Eg.  Query qry= em.createQuery("Select f from Fruits f where f.Type =: t ");

        qry.setParameter("t",Type.Sweet);

 

But it return a null result list.

 

edit
delete
#2

It should work. Please provide a minimal test case (see posting instructions) to demonstrate the issue.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
edit
delete

Reply

To post on this website please sign in.