I have realized after upgrading to Play 1.1, all my queries with join
statement changes from an inner join to a cross join. I am able to fix
this in all my queries except classes that uses CRUD. Is there any way
of specifying the type of join in CRUD in order for me to work around
this problem? Below is the error I received. I am using Play 1.1 beta 2,
HSQLDialect
Internal Server Error (500) for request GET /admin/commsaliases
Execution exception (In {module:crud}/app/controllers/CRUD.java around
line 252)
PersistenceException occured :
org.hibernate.exception.SQLGrammarException: could not execute query
play.exceptions.JavaExecutionException:
org.hibernate.exception.SQLGrammarException: could not execute query
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:285)
at Invocation.HTTP Request(Play!)
Caused by: javax.persistence.PersistenceException:
org.hibernate.exception.SQLGrammarException: could not execute query
at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1235)
at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1168)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:250)
at play.db.jpa.JPAPlugin$JPAModelLoader.fetch(JPAPlugin.java:422)
at controllers.CRUD$ObjectType.findPage(CRUD.java:252)
at controllers.comms.CommsAliases.list(CommsAliases.java:27)
at
play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:408)
at
play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:403)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:176)
... 1 more
Caused by: org.hibernate.exception.SQLGrammarException: could not
execute query
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2297)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2172)
at org.hibernate.loader.Loader.list(Loader.java:2167)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:448)
at
org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
at
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:241)
... 7 more
Caused by: java.sql.SQLException: Unexpected token: CROSS in statement
[select top ? commsalias0_.id as id1_, commsalias0_.name as name1_,
commsalias0_.user_id as user3_1_ from COMMS_Alias commsalias0_ cross
join RBAC_Member user1_ where commsalias0_.user_id=user1_.id and
user1_.name='sgiadmin' order by commsalias0_.name ASC]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
at
com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:213)
at
org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
at
org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
at
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1596)
at org.hibernate.loader.Loader.doQuery(Loader.java:717)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)
at org.hibernate.loader.Loader.doList(Loader.java:2294)
... 15 more
Which database are you using?
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.
>
>
--
Guillaume Bort, http://guillaume.bort.fr
For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com
This version don't seem very stable yet (even if it is marked as
stable by the hsqldb team I've noticed several strange things).
Btw I'm not sure to have understood exactly what your issue is?
--
Guillaume Bort, http://guillaume.bort.fr
For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com
Ok but is it a problem?
All the framework test cases pass and they all use HSQL.
--
Guillaume Bort, http://guillaume.bort.fr
For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com