The next installment of the Summer of NHibernate Screencast series is now available for general download!
In this session we explore the NHibernate SchemaExport class and start to exercise its ability to generate our database schema directly from our hbm.xml mapping files. In addition, we touch briefly on some of the relative advantages of DDD (Domain Driven Design) and start to understand how this aspect of NHibernate can help us avoid having to place the database front-and-center in our development mind as we are refining our Domain Model in our overall software development process.
Some of the highlights from this session include:
- Overview of the SchemaExport class and its role in our development process
- Understanding the somewhat awkward API methods exposed by the SchemaExport class
- Interpreting the somewhat arcane arguments to methods of the SchemaExport class
- Controlling the names of foreign keys in our generated schema
- Understanding the limitations of the DROP capabilities exposed by the SchemaExport class
- ‘Tricking’ the SchemaExport class into creating VIEWs from our mapping files instead of TABLEs
- defining a database INDEX in our mapping files
- applying unique constraints to the database from our mapping files
As usual, comments, suggestions, feedback and constructive criticism are appreciated~!