Mathieu
未読、2011/04/27 9:51:282011/04/27投稿者に返信する場合はログインしてください
転送する場合はログインしてください
このグループ内のメッセージを削除する権限がありません
メールアドレスがこのグループでは匿名化されているか、メンバーのメールアドレスを表示する権限がないため、元のメッセージを表示できません
To: SimpleJPA
Hi !
I'm curently trying to use Simple JPA ( wich is very good, thanks to
the developpers :D )
I'm having trouble while using the ( )... Here is my request :
Query query = em.createQuery("select s from Session s where s.customer
= :customer and ( s.status = :status1 or s.status = :status2 )");
query.setParameter("customer", "1");
query.setParameter("status1", "open");
query.setParameter("status2", "uploading");
But at the execution, I get this erro :
Testcase: testGetRoot(unitTest.SessionTest): Caused an ERROR
parameter is null for: status2 )
javax.persistence.PersistenceException: parameter is null for:
status2 )
at
com.spaceprogram.simplejpa.query.QueryImpl.getParamValueAsStringForAmazonQuery(QueryImpl.java:
405)
at
com.spaceprogram.simplejpa.query.QueryImpl.appendCondition(QueryImpl.java:
388)
at
com.spaceprogram.simplejpa.query.QueryImpl.toAmazonQuery(QueryImpl.java:
270)
at
com.spaceprogram.simplejpa.query.QueryImpl.toAmazonQuery(QueryImpl.java:
270)
at
com.spaceprogram.simplejpa.query.QueryImpl.createAmazonQuery(QueryImpl.java:
173)
at
com.spaceprogram.simplejpa.query.QueryImpl.getResultList(QueryImpl.java:
104)
at sage.mybi.session.SessionTest.testGetRoot(SessionTest.java:
34)
I tried with or without space between characters and ( ) but still
failed...
Can anyone help me please ?