I think this line is supposed to be hubbas, not bubbas, just to clarify-

$hubba = $bubba->hubbas->find($id);

That's a bit odd way to do it. hubbas called on a bubba is going to return the list of the hubbas that belong to it. I didn't even realize your syntax would work (calling a method on the hubbas call). I can't test it now but it's probably because the context returns an iterator instead of an object list and the iterator will allow the find call.

You probably want, should be using, the search_related method. $hubba->bubba returns the object representing the result/row of that bubba. It's not a resultset and I don't think context manipulation, like the hubbas call can change that.

About DBI... DBI is great! DBIC is built on it and its various engines. That said, DBIC buys you 100 things DBI doesn't and they are the things that most devs end up rolling themselves in some form or another and doing 1) badly, 2) without tests, 3) in a dead-end way, 4) without public release, 4) buggy, 5) etc. I have a rant brewing for AM below. Don't know if I'll bother tonight but that kind of thinking is what dooms software projects that end up growing to be miserable dung heaps for the devs who inherit them; c.f., me.


In reply to Re^3: Looking for DBIx::Class tutorials and examples by Your Mother
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.