Nigel Metheringham wrote:
> On Mon, 2006-08-21 at 14:01 +0100, Sherwin D'Souza wrote:
>> Is there relationships similar to Class::DBI::Relationship::IsA in
>> DBIx, such that
>>
>>   e.g.  Table: Window  columns (window_id title keywords) 
>>                    CircleWindow   columns (window_id radius
>> border_width)
>>
>>           $circlewindow->radius; 
>>           $circlewindow->title; 
>>           $circlewindow->keywords;
>>
> 
> You could do

        CircleWindow->belongs_to(window_id => 'Window', undef, { proxy => [ 
qw/title 
keywords/ ] });

would add the title and keyword methods for you as well.

> 
> which would lead to
>           $circlewindow->radius; 
>           $circlewindow->window_id->title; 
>           $circlewindow->window_id->keywords;
> 
> You could add methods to CircleWindow to pass title/keywords straight
> through.
> 
> See
>       DBIx::Class::Relationship
>       DBIx::Class::Relationship::Base
> and the manual.
> 
>       Nigel.
> 


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