-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate error in composing Query
PostPosted: Wed Aug 01, 2007 6:50 am 
Newbie

Joined: Thu Jun 28, 2007 1:46 pm
Posts: 7
I am using Hibernate 3.2.4 sp1, and MySQL 5, when I save object to DB, Hibernate compose the following SQL:

insert into db.test(id, introtext, fulltext) values (?, ?, ?);

And error occurred when executing this query.
The problem is that the name of the column fulltext is also a keyword in MySQL query.

In case, I compose this query by hand I would put the column name between `` (eg. insert into db.test(`id`, `introtext`, `fulltext`) values (?, ?, ?);).

How do I get out of this error in case I still using Hibernate and cannot change the column name, or write manual QueryBuilder?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.