#1323: broken non-equal nest relations (many-to-many self referencing)
-----------------------+----------------------------------------------------
  Reporter:  floriank  |       Owner:  romanb               
      Type:  defect    |      Status:  new                  
  Priority:  critical  |   Milestone:  1.0.0-RC2            
 Component:  Record    |     Version:  0.11                 
Resolution:            |    Keywords:                       
  Has_test:  1         |    Mystatus:  Pending Core Response
 Has_patch:  0         |  
-----------------------+----------------------------------------------------
Comment (by floriank):

 Replying to [comment:12 romanb]:
 > So from my side everything looks good now. I would just like to get a
 final OK from you, are there any more issues with these relations?

 Im sorry, but I have no OK for you. I got another issue, which I
 unfortunately cannot repeat in a testcase till now. The new problem is:
 when I try to add a new child to a record which already has a child and a
 parent, the old child is overwritten with the new one and not added as it
 is intended. This error only appears in the Concept-Record of my real
 application which is more complex than the 1323b2-Testcase.

 Unfortunately I cannot look for the problem because I am already much too
 late here. My current failing lines of code in my application are:

 situation: 967 has one parent and one child, 1921 shall be added as child:


 {{{
 $concept = Doctrine::getTable('Concept')->find(967);
 $c2 = Doctrine::getTable('Concept')->find(1921);
 $concept->narrowerConcepts[] = $c2;
 $concept->save();

 }}}

 result: 1 parent, 2 childs (as intended)

 {{{
 $concept = Doctrine::getTable('Concept')->find(967);
 //the different line follows: lets assume i need $concept->broaderConcepts
 later...
 $broader = $concept->broaderConcepts;
 $c2 = Doctrine::getTable('Concept')->find(1921);
 $concept->narrowerConcepts[] = $c2;
 $concept->save();
 }}}

 result: 1 parent, 1 child (1921) which is obviously wrong.

-- 
Ticket URL: <http://trac.phpdoctrine.org/ticket/1323#comment:13>
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