Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: DBIx and ManyToMany Relationships

by kiz (Monk)
on May 30, 2012 at 10:43 UTC ( #973256=note: print w/ replies, xml ) Need Help??


in reply to Re: DBIx and ManyToMany Relationships
in thread DBIx and ManyToMany Relationships

That gets me

'_column_data' => { 'content_id' => 11, 'repo_id' => 1 }

.... but not the text that relates to content_id:11

I need to go repo.id (1) -> content_ids ([1, 3, 5, 11]) -> text ([Video, Audo, Word Processor, XML])



-- Ian Stuart
A man depriving some poor village, somewhere, of a first-class idiot.


Comment on Re^2: DBIx and ManyToMany Relationships
Select or Download Code
Re^3: DBIx and ManyToMany Relationships
by tospo (Hermit) on May 30, 2012 at 11:14 UTC
    I'm not sure I udnerstand what you mean with "that get's me ..." - can you post the actual code you are running now?
      (Noting the comment below)

      The search model is currently:

      $c->stash( repos => [ $c->model('ORIdatabase::Repo') ->search( {}, #$what, { join => {'contentlinks' => 'content'} , prefetch => {'contentlinks' => 'content'} , rows => $params->{'limit'} } ) ] );

      And buried at the end of the hash/object returned are the data fields the query returns...



      -- Ian Stuart
      A man depriving some poor village, somewhere, of a first-class idiot.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2015-07-06 05:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls