-->
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: About reserved keywords in different dialects
PostPosted: Tue Jan 11, 2005 11:41 am 
Newbie

Joined: Tue Jan 11, 2005 11:20 am
Posts: 1
Sure, if i use
<property name="statistics" column="`statistics`" length="32" not-null="false"/>
all OK, but how about internal Hibernate checking reserved keywords

I see, that is a simple:
1) in abstract class Dialect insert master keywords like ALTER CREATE SELECT UPDATE DELETE etc.
2) call checkout field operation and quotes fileds
3) in any concrete class insert method quotes and minor dialect reserved keywords like SQLServerDialect must content STATISTICS keyword

That help many developer avoid writing column="`statistics`" in quotas - (needs know ALL reserved keywords in ALL dialects, if need move application under another SQL platform).

Thank you.
Best regards, Igor

[b]Hibernate version:[/b]
3.0 beta1

[b]Mapping documents:[/b]
...
<property name="statistics" length="32" not-null="false"/>
...

[b]Code between sessionFactory.openSession() and session.close():[/b]
...

[b]Full stack trace of any exception that occurs:[/b]
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Incorrect syntax near the keyword 'statistics'.

[b]Name and version of the database you are using:[/b]
any MS SQL Server

[b]The generated SQL (show_sql=true):[/b]
Hibernate: select top 200 this_.id as id0_, this_.name as name0_0_, this_.phone_number as phone_nu3_0_0_, this_.statistics as statistics0_0_ from employers this_ order by this_.phone_number desc


[b]Debug level Hibernate log excerpt:[/b]
default
[color=red][/color][color=red][/color]


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.