Jacob Smullyan <[EMAIL PROTECTED]> writes: > I have mixed feelings about automagical schema introspection. PyDO > supports it, and will probably do so increasingly robustly if people > use it. But part of me feels that "explicit is better than implicit" > may win out over DRY here, because the ORM layer and the db layer > exist in different realms, and if the ORM layer adapts silently to > changes in the db layer, other code is likely to fail in unpredictable > ways, including silently, whereas an explicit declaration of what > fields are in a table, for instance, will fail with a hard error. But > maybe this is anal retentiveness, akin to a need for strong typing.
I just wonder when it becomes bad having to declare everything. For example, we have databases with 600 tables. Declaring them all again will make a huge PITA and would not be very helpful, specially because there's already some declarations at the ER diagrams, at the SQL script, inside the database, and then again at each and every python class? Having the introspection is great in this case (even though it is boring having to declare all those classes and tell them to fetch their structure from the database it is better than having to "recreate" all of them). With regards to failures, this is one of the reasons for unit tests :-) They can help finding out where is the problem and they should never fail silently. -- Jorge Godoy <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list