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]
|