Amaro, I started going down the path you suggested and I'm running into some pretty big road blocks.
1) Resolving the type of a column requires access to the mapping which is private to Configuration 2) PersistentIdentifiers are black-boxes which keep their params private and spit out some sql. These are both pretty big blockers which my code addresses through the operations framework. I'm definitely much more interested in using FluentMigrator to do the actual migrations but at this point NHibernate doesn't expose the information FluentMigrator needs. On Monday, February 16, 2015 at 9:15:49 AM UTC-5, Amro El-Fakharany wrote: > > Take a look at the implementation of IterateGenerators in the > Configuration class (the last method in Configuration.cs). > > It shows how to get hold of identifier generators. > > > > As for auxiliary objects the easiest way I can ad hoc think of would be to > subscribe to one of the Events BeforeBindMapping or AfterBindMapping of > Configuration. > > Both events gets HbmMapping as a property of the argument > BindMappingEventArgs. > > In the event handler you just iterate over HbmMapping.DatabaseObjects. > > I won’t overestimate the importance of auxiliary objects though. > > > > > > *Von:* [email protected] <javascript:> [mailto: > [email protected] <javascript:>] *Im Auftrag von > *Jeffrey > Becker > *Gesendet:* Montag, 16. Februar 2015 14:26 > *An:* [email protected] <javascript:> > *Betreff:* Re: [nhibernate-development] Re: Migrations Status & Feedback > request > > > > I did look into using the PersistentClass property but that doesn't seem > to include information about identifier generators or auxiliary db objects. > My first thought with this was to simply spider configuration and spit out > a fluent migrator based class. I went down the whole operations framework > path after concluding that all the mapping information I needed just wasn't > available. > > On Saturday, February 14, 2015 at 9:54:00 AM UTC-5, Amro El-Fakharany > wrote: > > There is no need to read XML files or interpret mapping-by-code stuff. > All of the required mapping information ends up in PersistentClass which > is exposed in Configuration through the Enumerable Property ClassMappings > if I remember correctly. > > -- > > --- > You received this message because you are subscribed to the Google Groups > "nhibernate-development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:> > . > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "nhibernate-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
