nhibernateschemaexport

NHibernate - SchemaExport Tool Question?


Is it posible to control what objects get generated when using the SchemaExport tool. For example if I have NH mapping files for an EntityA, EntityB, and EntityC how can I exclude C from being created?

Roberto.-


Solution

  • How can use the SchemaUpdate instead of the SchemaExport, the SchemaUpdate will udpate only the schema.

    Or if you use NH 2.1 you can add the schema-action="none" to your mapping :

    http://nhforge.org/blogs/nhibernate/archive/2008/12/15/customizing-schema-export-with-schema-action.aspx