Try using ` instead, like in table="`PERSON`" or better yet using the 
AutoQuote flag in the configuration.
Loquacious:

NHibernate.Cfg.Configuration cfg = new NHibernate.Cfg.Configuration()
.DataBaseIntegration(db =>
{
    db.KeywordsAutoImport = Hbm2DDLKeyWords.AutoQuote;

    ///...

}

Or XML:

<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">      
<session-factory>               <property 
name="hbm2ddl.keywords">auto-quote</property>

...

RP

On Friday, May 31, 2013 12:12:08 AM UTC+1, Mirosław Sarna wrote:
>
> SQLServer, nhibernate
>
> I have problem with name of table and columns which are using character [ ]
>
> E.g.
> table="[PERSON]" 
>
> With these character [ and ] hibernate has problem with upgrading database 
> schema.
> When I use UpdateSchema hibernate still generate exception that tables 
>  exists.
>
>
>
> When I remove [ ] upgrading is working.
>
> Thanks,
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to