Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Query within a BasicCollection

Hello,

A begin with JPA Eclipse-Link and I need to query a database where an entity contains a BasicCollection.

@Entity
public class MyEntity {
   @BasicCollection(fetch=FetchType.EAGER)
   private List<Integer> numbers = new ArrayList<Integer>();
}

I want to query all entities that contain a certain value within the "numbers" attribute.

Query query = entityManager.createQuery("select e from MyEntity e where e.numbers=10");

This does not work. What is the correct syntax ?

Thanks in advance,

begin:vcard
fn:Pierre-Olivier TERRISSE
n:TERRISSE;Pierre-Olivier
org;quoted-printable;quoted-printable:Universit=C3=A9 de Nantes;D.S.I. Direction des Syst=C3=A8mes d'Information
email;internet:Pierre-Olivier.Terrisse@xxxxxxxxxxxxxx
title;quoted-printable:Gestion de l'identit=C3=A9
version:2.1
end:vcard


Back to the top