dabo Commit
Revision 2154
Date: 2006-05-15 18:38:04 -0700 (Mon, 15 May 2006)
Author: paul

Changed:
U   trunk/dabo/biz/dBizobj.py

Log:
Added the ability to set a bizobj LinkField to a table.field reference, 
instead of merely a field reference. This appears to be essential to 
making M:M joins work, where you don't have a bizobj defined for the 
join table.


Diff:
Modified: trunk/dabo/biz/dBizobj.py
===================================================================
--- trunk/dabo/biz/dBizobj.py   2006-05-15 14:32:15 UTC (rev 2153)
+++ trunk/dabo/biz/dBizobj.py   2006-05-16 01:38:04 UTC (rev 2154)
@@ -679,7 +679,15 @@
                                        val = 
self.escQuote(self.Parent.getFieldVal(self.ParentLinkField))
                                else:
                                        val = self.escQuote(self.getParentPK())
-                               filtExpr = " %s.%s = %s " % (self.DataSource, 
self.LinkField, val)
+                               linkFieldParts = self.LinkField.split(".")
+                               if len(linkFieldParts) < 2:
+                                       dataSource = self.DataSource
+                                       linkField = self.LinkField
+                               else:
+                                       # The source table was specified in the 
LinkField
+                                       dataSource = linkFieldParts[0]
+                                       linkField = linkFieldParts[1]
+                               filtExpr = " %s.%s = %s " % (dataSource, 
linkField, val)
                        self._CurrentCursor.setChildFilterClause(filtExpr)
                                        
 




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to