[Dbix-class] Non Persistence Fields

Matt S Trout dbix-class at trout.me.uk
Wed Jun 27 17:22:48 GMT 2007


On Wed, Jun 27, 2007 at 08:49:54AM -0700, Praveen Ray wrote:
> Hello Everyone
> I've just started using DBIx and was looking for a functionality similar to Class::DBI's TEMP column groups. These are columns which are in the Object but not in the database. Since there is a CDBI compatibility layer, it must be
> supported but I didn't find an example on how to specify such columns. I was expecting an option to add_columns would do it but there is no such option.

You don't need them in DBIC - CDBI needs them because it overrides get and set
so you can't make normal accessors, in DBIC you can just do

__PACKAGE__->mk_group_accessors('simple' => @attrs);

or inherit from Class::Data::Accessor or your other favourite accessor
system and just use that :)

It's not a column, so we don't expect you to pretends it's one.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/             http://www.shadowcatsystems.co.uk/ 



More information about the Dbix-class mailing list