Subsonic DB Schema Generation
I was watching subsonic's simple repository demo. I came to know that DB schema can be generated from code. I think of code generation as usually domain layer from database. Where is this usefu开发者_如何转开发l?
The simple repository generates a database from DTO objects and in contrast if you use the ActiveRecord templates the data layer is generated from an existing db.
For small or new projects with little changes to the database the simple repository is fine but for a larger DB or if you start to migrate an existing project with a grown DB to subsonic you would probably be happier with ActiveRecord.
I would recommend using the ActiveRecord approach and additionally use the migration tool from subsonic 2 for further changes to the DB (it can be used independently from subsonic 2 since it's a standalone tool).
Defining SubSonic 3 ActiveRecord migrations
精彩评论