Actually, using [ ] is specific to your database (probably SQL Server from 
the way your queries look).  Instead of using [ ] you should really use 
NH's database-neutral equivalent of ` (back-tick, the character usually on 
the same key as the tilde ~ on most keyboards) as the character to surround 
your table alias.  This will permit your mapping layer to work with 
databases for which the brackets aren't the character sequence used to 
surround compound names or other special use-cases.  With SQL Server, the ` 
will be replaced with [ ] but for other DB targets supported by NH the ` 
will be replaced with the appropriate equivalent for that other database 
platform.

e.g., use the database-portable....

`MyTable`

...instead of the sql-server specific....

[MyTable]

HTH,

-Steve B.

On Thursday, September 6, 2012 9:08:55 AM UTC-4, Jon Levett wrote:
>
> Thanks to a suggestion on SO, I managed to fix this by placing [] brackets 
> around the table alias.

-- 
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/-/jd10_oM95yAJ.
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