On May 1, 2008, at 12:56 PM, Ed Leafe wrote:

>       I'm not sure that the problem is new(); it looks like the code in
> setCurrentParent() is not correct. It assumes that the link is via the
> PK, which in this case is not true.
>
>       I'll look into it some more later and post my changes for you to  
> test.

        OK, after some digging, there is another problem: the code in  
setChildLinkFilter(), starting around line 849, reads:

if self.DataSource and self.LinkField and self.Parent:
        if self.Parent.IsAdding or self.Parent.RowCount == 0:
                # Parent is new and not yet saved, so we cannot have child 
records  
yet.
                self.setWhereClause("")
                filtExpr = " 1 = 0 "

        Paul, do you agree that the assumption that a new, unsaved parent  
cannot have child records yet, is incorrect, since the child could be  
based on some other field, as it is here? Can you see any problem with  
changing the second line above to read:

        if self.Parent.RowCount == 0:


-- Ed Leafe





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to