No, this is different case, all examples in joining manuals describe how to access related but independent objects - there is always one object one row.

What I am looking for is how to implement the inheritance with additional attributes in DBIC.

An unsophisticated example:

-- I have an animal table describing species create table myschema.animal ( species varchar2(64) primary key, region varchar2(64) ); -- and some tables extending the animal create table myschema.animal_mammal ( species varchar2(64), -- foreign key max_height number, quadrupedal number(1) default 1 -- 0 or 1 ); create table myschema.animal_bird ( species varchar2(64), -- foreign key max_wingspan number, number_of_eggs number );

I would like to create the DBIC classes for mammal and bird so I can work with them as single objects.

my $dog = $schema->resultset('Mammal')->find('Canis familiaris'); warn $dog->region, ' ', $dog->max_height; my $chimp = $schema->resultset('Mammal')->create({ 'species' => 'Pan troglodytes', 'region' => 'Africa', 'quadrupedal' => 0, });

In reply to Re^2: Extension of DBIC "model" class by roman
in thread Extension of DBIC "model" class by roman

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.