John Napiorkowski wrote:
> Hi,
> 
> I've seen quite a few messages on this list regarding
> the use of proxied or added columns but I was hoping
> someone could clarify a question for me.  If I add a
> column to a schema using the proxy attribute like so:
> 
> __PACKAGE__->belongs_to(
> 
>   type_id => 'Window', 
>   { 'self.type_id => 'foreign.type_id},
>   { proxy => [ qw/type_name/ ] },
> 
> );
> 
> in my schema modules  I have no trouble accessing it
> using
> 
>   $row->type_name
> 
> but it doesn't seem to show up in "$row->get_columns"
> or in "$result_set->result_source->columns".

Of course not, they aren't columns on the object.


> Is there some way to get these proxied columns
> programatically?  Or should the above work and I'm
> just doing something wrong (likely :) ).

$result_source->relationship_info($relname)->{attrs}{proxy}

-- 
      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/ +

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to