[hibernate-issues] unexpected token: 913705176
Daniel Gradecak
daniel at gradecak.com
Wed Aug 30 11:32:24 EDT 2006
Hi all,
My column in the database is varchar(30). The query I am using looks like :
Query query = session.createQuery("from Person pers inner join fetch
pers.party p inner join fetch p.contacts c inner join fetch
c.contactTelephones t where t.telNumber = "+telNum);
The variable telNum is String.
of course all the tables are mapped correctly (for sure).
When telNum does not have a 0 as leading character then everything is OK
but as soon as I put a leading 0 I got this exception ... why?
org.hibernate.hql.ast.QuerySyntaxException: unexpected token: 913705176
near line 1, column 171 [from com.restartsystems.svarog.entity.Person
pers inner join fetch
pers.party p inner join fetch p.contacts c inner join fetch
c.contactTelephones t where t.telNumber = 0913705176]
More information about the hibernate-issues
mailing list