Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Schema name not supported in Eclipse link query?

You need to set your schema name on the @Table annotation using the
schema property, then when the JPQL gets translated into SQL
eclipselink will add the schema.

./tch



On Thu, Jul 29, 2010 at 7:16 AM, Tanujit Chowdhury
<chowdhury.tanujit@xxxxxxxxx> wrote:
> Hi,
> I am using Eclipseink 1.0.2 with Oracle Weblogic 10.3.0 and conneting
> to a MS SQL database. I am using a simple 'ALL' query "select a from
> bookingsystem a" and it fails saying that 'bookingsystem' is an
> unknown entity. I have modified my query as 'select a from
> VMLO.bookingsystem a' where 'VMLO' is the schema name. While executing
> this query I am getting exception like :
> Caused by: Exception [EclipseLink-8024] (Eclipse Persistence Services
> - 1.0.2 (Build 20081024)):
> org.eclipse.persistence.exceptions.JPQLException
> Exception Description: Syntax error parsing the query [select a from
> VMLO.bookingsystem a], line 1, column 18: syntax error at [.].
> Internal Exception: MismatchedTokenException(71!=66)
>        at org.eclipse.persistence.exceptions.JPQLException.syntaxErrorAt(JPQLException.java:355)
>        at org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.handleRecognitionException(JPQLParser.java:304)
>        at org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.addError(JPQLParser.java:245)
>
> Seems it is now not excepting the schema name in the query. How to
> make this work?
>
> --
> Tanujit Chowdhury
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>


Back to the top