On Thu, Jul 23, 2009 at 08:28, Alexander Hartmaier<alexander.hartma...@t-systems.at> wrote: > The DBMS validates data types, length, undef and foreign keys anyway, so > maybe using it as validator (parse its error messages) is a possibility?
The problem is that many DBMSes do -NOT- validate things sanely - SQLite and MySQL being the biggest offenders, though every DBMS has its problems. Oracle, for example, in 9.2.0.3 had an issue where certain invalid datetime entries were accepted. Furthermore, part of the benefit of an ORM is that it is DBMS-independent - I want to know that the same value restrictions are going to be maintained regardless of backend. And, finally, the biggest win for validation is things that DBMSes cannot do. For example, a SMALLINT that, for business reasons, has to be within 20 of another column. How do you express that constraint in a DBMS-independent fashion? I, for one, cannot wait for our new Moose overlords! Rob _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk