[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Query within a BasicCollection
|
I tried this query an I have this error message :
Exception in thread "main" java.lang.IllegalArgumentException: An
exception occurred while creating a query in EntityManager
at
org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:742)
at test.EclipseLinkTest.main(EclipseLinkTest.java:40)
Caused by: Exception [EclipseLink-8030] (Eclipse Persistence Services -
1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Error compiling the query [select e from MyEntity
e where 10 member of e.numbers], line 1, column 46: unknown state or
association field [numbers] of class [test.entites.MyEntity].
--Pierre-Olivier.
Gordon Yorke a écrit :
The MEMBER OF syntax may work for you : " select e from MyEntity e
where 10 member of e.numbers"
--Gordon
Pierre-Olivier TERRISSE wrote:
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,
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
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