Hi, On Wed, Feb 9, 2011 at 3:30 AM, Skye Shaw <[email protected]> wrote: > Hello, > > Is it possible to have DBIC populate a newly created instance with the > underlying table's defaults when a value isn't provided?
One alternative you might consider is to move the defaults from the DB to the DBIx::Class side, using this: http://search.cpan.org/dist/DBIx-Class-DynamicDefault/lib/DBIx/Class/DynamicDefault.pm I've done it on some projects, where I know that all the DB creation/updates are done via my DBIx::Class schema, and it works fine, specially because I could use the default values on HTML forms. Bye, -- Pedro Melo http://www.simplicidade.org/ xmpp:[email protected] mailto:[email protected] _______________________________________________ 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/[email protected]
