Felice, try to public the same in NH-Forge, perhaps you will have more help to test the db2hbm in more real cases ;)
2010/1/30 FaticaLabs <[email protected]> > Hi all, > I did some progress in reverse engineering database to hbm files. That > projects exists in the hbm2net solution under NHContrib. I will look > for a better place if pepole will find this useful. I just would like > to describe how the project status is until now. > There is no UI nor console application: just the core dll > NHibernate.Tool.Db2hbm. Test for that are located in the > NHibernate.Tool.hbm2net.Tests-2.0 test dll. I know it is not the right > place, but this stuff started as an experiment. > Anyway, the testing process I used ( it is actually more an > integration test suite ) is the following: > > foreach reverse engineering scenario we: > -Starts from an Hbm describing the target mapping scenario > -Generate the classes using hbm2net http://nhforge.org/media/p/546.aspx > -Build the assembly > -lets NHibernate creating a DB:this is the db we will use to reverse > engineering > -lets the tool generate the hbm(s) > -use XmlUnit to compare the results with the starting hbm. > > As you guess some of these pass are not pure "in memory", and the > database used for the test is SQL Express, so test are not immediate, > but ie 11 tests run in about 10 seconds. > The tool now understands key,properties, many-to-one, set ( of entity > or of components ), map, many-to-many using bag or idbag, and it seems > to deal well with comoposite keys too. > > Unfortunately real test using ie AdventureWorks, still fail, but this > is going to change soon. I'm looking for some help because I would > like to create a foreign key discovering mechanism for each major DB > ( the one provided with ado.net is just not enought ) to make the tool > useful. If interested look in the db2hbm code and see the > IForeignKeyCrawler implementation for MSSQL. > I'm interested in any other comments too. > Thanks, > Felice Pollano > > -- > You received this message because you are subscribed to the Google Groups > "NHibernate Contrib - Development Group" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhcdevs%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhcdevs?hl=en. > > -- Fabio Maulo -- You received this message because you are subscribed to the Google Groups "NHibernate Contrib - Development Group" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhcdevs?hl=en.
