Actually, you don't want square brackets [ ] because that is an escape 
sequence specific to SQL Server and won't be portable across different 
databases (one of the points of an ORM like NH).  Instead, you want the ` 
(back-tick) which is what NH uses to escape reserved words in a DB-portable 
manner.  So instead of [User] you actually want `User`.

You can either do this on a case-by-case basis (if you are using XML 
mapping files) or set it globally in the hibernate.cfg file by adding the 
following entry: <property name="hbm2ddl.keywords">auto-quote</property>

-Steve B.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nhusers/-/IY4BgpO9dboJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to