#1467: REGRESSION: Problem with many-to-many
------------------------------+---------------------------------------------
  Reporter:  colnector        |       Owner:  romanb               
      Type:  defect           |      Status:  new                  
  Priority:  critical         |   Milestone:  1.0.3                
 Component:  Query/Hydration  |     Version:  1.0.0                
Resolution:                   |    Keywords:                       
  Has_test:  0                |    Mystatus:  Pending Core Response
 Has_patch:  0                |  
------------------------------+---------------------------------------------
Comment (by colnector):

 Thank you for trying to help but this is not what I'm trying to do.
 An Item may have many pictures and vice versa.
 A puzzle may have many items and an item may belong to more than one
 puzzle.

 Thus
 {{{
 Item(id)
 Picture(id)
 ItemPicture(item_id, picture_id)
 Puzzle(id, item_id)   (could have been called ItemPuzzle(puzzle_id,
 item_id) but it's an extra useless table)
 }}}

 Now finding all the pictures making the puzzle is simple in SQL:
 {{{
 SELECT picture_id FROM ItemPicture INNER JOIN Puzzle ON
 ItemPicture.item_id=Puzzle_item_id
 }}}

 Is it impossible with DQL???

-- 
Ticket URL: <http://trac.phpdoctrine.org/ticket/1467#comment:14>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to [EMAIL PROTECTED]
 For more options, visit this group at 
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to