Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Help with joins in DBIx::Class

by castaway (Parson)
on Feb 02, 2006 at 17:35 UTC ( [id://527387]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      # in Images:
      __PACKAGE__->has_many('GalleryMaps' => 'Gallery::Model::DBIC::Galler
    +yMap', 'iid');
    ...
    
      # in Galleries
      __PACKAGE__->has_many('GalleryMap' => 'Gallery::Model::DBIC::Gallery
    +Map', 'gid');
    
  2. or download this
      # Get images in a gallery, assuming $g is a gallery:
    my @images = $g->GalleryMaps->search_related('iid');
    
     # Get galleries an image is in, assuming $i is an image:
    my @galleries = $i->GalleryMaps->search_releated('gid');
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://527387]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-16 22:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found