Ok, thanks a lot, I'll play with it a little more but I am getting frustrated...

Here's e.g. one problem I have:

I have two classes/tables with a one-to-many relationship.

So in the one I do

# in SMU::Bubba __PACKAGE__->has_many( hubbas => 'SMU::Hubba' );
In the other I do:
# in SMU::Hubba __PACKAGE__->belongs_to( bubba => 'SMU::Bubba' );
So now I can navigate from a Bubba-instance to a Hubba-instance like this:
my $hubba = $bubba->bubbas->find($id);
But now when I want to navigate back from the Hubba to the Bubba via
$hubba->bubba
I can do that and it gives me a Bubba-instance, but I am getting a different instance of the class (describing the same row) which is causing me problems as I want to be able to walk the whole graph up and down and then do one update.

Maybe I really do it all in plain DBI...


In reply to Re^2: Looking for DBIx::Class tutorials and examples by morgon
in thread Looking for DBIx::Class tutorials and examples by morgon

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.