> It's possible for DM to generate model classes from the database like AR ?
I agree with Yehuda that writing the models using the standard DataMapper approach is probably better over the long run. I can't even begin to count the number of times I refer to my model files when working on an app. At the same time I've often wished for a library that could reflect on the schema, telling me all about the tables, columns, indexes, constraints and other meta data. It wouldn't even have to be DataMapper specific, but I could use it a few ways: - generate skeleton DM models with properties and some relationships inferred from FKs - compare existing DM models against the schema to ensure there is no divergence - rip out some of the guts in DataMapper.auto_upgrade! Kinda OT, but I've actually been wanting to beef up DataMapper.auto_upgrade! for a while, and widen the scope of what it can do safely. I don't see a problem with doing things where constraints are being loosened -- like increasing the length of CHAR fields, bumping INT to BIGINT, removing NOT NULL constraints when :nullable is no longer false, etc. Obviously I still want to keep it so auto_upgrade doesn't do anything destructive like making changes that would truncate or change existing data. Dan (dkubb) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" 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/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---
