in reply to Re^3: Moose + ORM
in thread Moose + ORM

I like where you are headed.

The basic problem which this addresses is Moose classes and database schemas getting out of sync.

Unfortunately, it assumes that the database schema is always right, which is not necessarily true.

I think the ideal solution is to make a Role that optionally injects attributes, or compares attributes and schema.

I see the problem that in a group, sometimes people make changes to code and database, and there is no easy way to check whether the ORM mapping is valid.

I had planned to do something with SQL::Translator to handle this, by making a Parser that can parse Moose class hierarchies. (To be honest, s/I had planned/It sure would be nice to have/g)