yfeldblum
yfeldblum

Reputation: 65445

How to tell NHibernate always to force quoted identifiers?

As the title: How would I tell NHibernate, once and for all, that all table and column names are to be quoted in the SQL it generates?

Upvotes: 5

Views: 1345

Answers (3)

Newbie
Newbie

Reputation: 7249

You can also try:

SchemaMetadataUpdater.QuoteTableAndColumns(configuration);

Upvotes: 5

pvasek
pvasek

Reputation: 1156

You need to add

<property name="hbm2ddl.keywords">auto-quote</property>

to your NHibernate configuration.

Upvotes: 4

Jasper
Jasper

Reputation: 846

I've not tried this, but as far as i can determine based on the documentation a custom implementation of the naming strategy allows you to rewrite the table/column names thus also enables you to quote them.

Upvotes: -1

Related Questions