Closed GoogleCodeExporter closed 9 years ago
Does this cause an error? It had been working in my tests.
Original comment by dwolvert
on 22 Sep 2010 at 12:31
The JPA will complain the syntax error, see below exceptions:
>>>>>>>> excerpt begin >>>>>>>>>>>>>
java.lang.IllegalArgumentException: An exception occurred while creating a
query in EntityManager:
Exception Description: Syntax error parsing the query [select id from Shop
where id = ?1], line 1, column 20: syntax error at [where].
Internal Exception: MismatchedTokenException(77!=78)
>>>>>>>> excerpt end>>>>>>>>>>>>>
I'm using JPA2.0 and EclipseLink, it looks like the EclipseLink complains such
syntax, I did not test hibernate. However, add alias will satisfy all JPA
providers.
BTW, if you want to reproduce this error, you need to call removeById()
directly, or clear the Entity Manager before executing the deletion if call
remove(). Otherwise, the remove() will try to use cached managed entity without
using ID.
Original comment by Jirong.Gao
on 22 Sep 2010 at 1:48
Original comment by dwolvert
on 1 Oct 2010 at 12:43
Original comment by dwolvert
on 1 Oct 2010 at 12:48
Fixed for 0.5.2
Original comment by dwolvert
on 21 Nov 2010 at 3:33
Original comment by dwolvert
on 22 Nov 2010 at 4:07
Original comment by dwolvert
on 27 Feb 2011 at 5:33
Original issue reported on code.google.com by
Jirong.Gao
on 21 Sep 2010 at 8:58