in reply to Re: Looking for DBIx::Class tutorials and examples
in thread Looking for DBIx::Class tutorials and examples
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 the other I do:# in SMU::Bubba __PACKAGE__->has_many( hubbas => 'SMU::Hubba' );
So now I can navigate from a Bubba-instance to a Hubba-instance like this:# in SMU::Hubba __PACKAGE__->belongs_to( bubba => 'SMU::Bubba' );
But now when I want to navigate back from the Hubba to the Bubba viamy $hubba = $bubba->bubbas->find($id);
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.$hubba->bubba
Maybe I really do it all in plain DBI...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Looking for DBIx::Class tutorials and examples
by Your Mother (Archbishop) on Apr 23, 2009 at 18:58 UTC | |
by morgon (Priest) on Apr 23, 2009 at 21:24 UTC |