[orm-devel] relationship many2many BUG w/ PATCH

Ross J. Reedstrom orm-devel@mailman.tux4web.de
Wed, 27 Nov 2002 16:01:26 -0600


--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Here's a quick one-line patch to fix the problem I buried in my previous
email about extending the many2many relationship. In a nutshell, the 
wrong primaryKey filename was being used to retrieve the child tuples.

Ross

-- 
Ross Reedstrom, Ph.D.                                 reedstrm@rice.edu
Executive Director                                  phone: 713-348-6166
Gulf Coast Consortium for Bioinformatics              fax: 713-348-6182
Rice University MS-39
Houston, TX 77005


--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="many2many.diff"

Index: relationships.py
===================================================================
RCS file: /var/data/public_cvs/orm/relationships.py,v
retrieving revision 2.2
diff -u -r2.2 relationships.py
--- relationships.py	2002/11/25 22:45:13	2.2
+++ relationships.py	2002/11/27 22:00:49
@@ -532,7 +532,7 @@
                      self._column.matrixTable(),
                      self._column.childsColumn(),
                      self._column.childClass().relation(),
-                     self._column.dbObj().primaryKey)
+                     self._column.childClass().primaryKey)
             
             result = self.ds().selectByClauses(self._column.childClass(),
                                                frm = frm, where=where)

--AhhlLboLdkugWU4S--