Quote from: BobRay at Dec 23, 2014, 09:21 PMIf the class and map files already exist, how would MODX know they are out of date? Comparing them with the schema on every DB access and updating them if necessary would solve your problem, but at a pretty steep price. .
If I were to code such a feature it would be an option in the $modx->getObject and newObject methods.
You would use $modx->getObject/newObject($classname,,,,true)... the "true" being a trigger to update/create the map. Then you simply remove that one option after you get a successful response. That would eliminate several lines of code needing to be written and removed each time you need to perform an update to a map, or create a new one.
Set default value to false and it will skip that option unless you need it. No extra cost at all. In fact it would essentially be free.