-->
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.  [ 2 posts ] 
Author Message
 Post subject: Generated SQL contains MySQL keyword
PostPosted: Sun Jun 12, 2005 9:27 am 
Newbie

Joined: Sun Jun 12, 2005 9:19 am
Posts: 1
Unfortunatly I'm having a problem with Hibernate that I cannot find in the documentation or forums.

I have a table in MySQL which holds a column which is named 'fulltext'.

When hibernate generates the SQL for my query the following SQL is generated:

select content0_.fulltext as fulltext ...

however 'fulltext' is considered as a KEYWORD in MySQL.

How can I get Hibernate to generate something similar to this:

select content0_.fulltext as fulltext_field ...

So that it does not interfer with Mysql keywords....

Thx!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 12, 2005 10:48 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
use backtick's to quote the column name.

_________________
Max
Don't forget to rate


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

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.