views:

200

answers:

2

Hi,

i'm using NHibernate with Sdf database. In my hibernate.cfg.xml file i've set:

<property name="hbm2ddl.auto" value="update"/>

But this does not seem to work at all. "Update" attribute should make NHibernate generate missing tables and columns during application launch, but it does not happen.

If i want missing tables geenrated I have to set hbm2dll.auto property to "create" which is not an option for me since it drops existing db content beforehand.

I experienced the same problem with PostgreSql problem. Am I missing something?

+1  A: 

I have the same problem. Someone has already found the solution? Thank you. Nicolás.

Nicolás Marzoni
+1  A: 

As far as I remember, I resolved the problem by using:

new SchemaUpdate(_cfg);

Please read about SchemaUpdate in NHibernate documentation.

You can alternatively try using Fluent NHibernate which will definetely work as you expect and even better!

mgamer
Fluent NHibernate is not an alternative to SchemaUpdate
Mauricio Scheffer