[Dbix-class] problems with object returned by ->create()

Matt S Trout dbix-class at trout.me.uk
Fri Apr 21 21:02:01 CEST 2006


Chisel Wright wrote:
> Same table structure, same create statement, different results returned.

Try specifying the sequence explicitly.

> The lesser issue ... if I test the values of
> $new_auth->some_other_table_column() that does exist in the table, but
> wasn't one of the columns specified, I get and undefined value - even
> for columns with a default value.

Right, that's because DBIC doesn't automatically do a SELECT after every 
INSERT. if you really want it to, call $obj->discard_changes;

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Dbix-class mailing list