Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] JPQL - FROM expression

Can't you just use

SELECT fe FROM FirstEmployee ...
SELECT se FROM SecondEmployee ...

???



On Wed, May 6, 2009 at 10:07 AM, James Sutherland <jamesssss@xxxxxxxxx> wrote:
>
> JPQL is required to use the Entity name.  Please log an enhancement request
> to have support for using the qualified class name as well.
>
>
>
> Rosiu1125 wrote:
>>
>> Hello
>> I try to migrate my project from Hibernate (jpa) to Eclipselink and I'm
>> confused...
>>
>> I have 2 classes:
>> - myPackageName.Employee
>> - otherPackageName.Employee
>>
>> Classes are annotated with @Entity(name="FirstEmployee") and
>> @Entity(name="SecondEmployee").
>>
>> Working with hibernate JPQL I could execute query like this:
>>    "SELECT e FROM myPackageName.Employee".
>> With eclipselink I get MismatchedTokenException - "syntax error at [.]"
>> and correct query is eg.:
>>    "SELECT e FROM FirstEmployee".
>>
>> Can I do something to use full class name in jpql queries? I saw a
>> solution to do something like @Entity(name="myPackageName_Employee") but I
>> don't like it.
>>
>> Thanks
>> Rosiu
>>
>>
>
>
> -----
> ---
> http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland
> http://www.eclipse.org/eclipselink/
>  EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
> TopLink
> Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink ,
> http://wiki.oracle.com/page/TopLink TopLink
> Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink ,
> http://www.nabble.com/EclipseLink-f26430.html EclipseLink
> Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence
> --
> View this message in context: http://www.nabble.com/JPQL---FROM-expression-tp23405446p23407451.html
> Sent from the EclipseLink - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>


Back to the top