I am currently building a bunch of reusable Cayenne "modules" that are not initially tied to a physical DB. At some later point a downstream app may import one or more of such modules, and their migrations will be applied to the app DB, and their Cayenne mappings merged into the app runtime. But when I am developing such modules, I have no real DB anywhere. But I'd still like to avoid manual ORM mapping and take advantage of DB-first approach and cdbimport.
So I am thinking of a new addition to our cdbimport flow: reverse engineering from DB migrations in the absence of the DB. Something like this should probably work: 1. Execute migration script over in-memory Derby DB. 2. Run cdbimport against Derby. I think this may be useful in other scenarios too, when working with a real DB is not an option... as long as we can create the full schema on Derby with reasonable speed. Perhaps some Liquibase best practices (separating schema migrations from data migrations) are in order here... Anyways, just a thought now. Think this may be very useful, becoming the last mile of Cayenne modularity. Andrus
