why stop when, ... NHibernate.Tool.hbm2ddl.SchemaExport

YankeeImperialistDog's Avatar

YankeeImperialistDog

24 Feb, 2010 10:27 PM via web

NHibernate.Tool.hbm2ddl.SchemaExport is working, but with the hbm.xml config. I am not able, well i'll get real here, I mean, "I don't know how", to get it to accept the Schema from fluent.
I included the NHibernate.hbm.xml as well as the offending class.

you help is greatly appreciated.

KES

  1. Support Staff 2 Posted by James Gregory on 24 Feb, 2010 10:33 PM

    James Gregory's Avatar

    The ExampleProject that's provided with FNH (if you have the source code)
    uses SchemaExport; you'll see that it uses the `ExposeConfiguration` method
    on the `Fluently.Configure` API to pass the configuration object to
    SchemaExport. Take a look at that, see if it clears things up... if not,
    I'll elaborate.

  2. 3 Posted by YankeeImperialistDog on 25 Feb, 2010 12:10 AM

    YankeeImperialistDog's Avatar

    That is working quite well thank you. I currently have two methods that create a sessionFactory. The first makes sense: Initilize()
    the second is identical to the first with the exception of the included .ExposeConfiguration(BuildSchema) and a check for an existing factory.

    is there a way to do the same thing from an existing factory? I was not able to find one.
    The only place i'll be using this will be in the unit tests so its really not that big of a deal, but i am curious.

    You help is greatly appreciated

    i did ask this but where is the avatar generator?

  3. Support Staff 4 Posted by Paul Batum on 01 Mar, 2010 07:40 AM

    Paul Batum's Avatar

    Register with gravatar and then make sure you use the same email address.

  4. Paul Batum closed this discussion on 01 Mar, 2010 07:40 AM.

Comments are currently closed for this discussion. You can start a new one.