Mutiple associations between objects and use in datagrid
I have an object Supplier (derives from Auditable) and Branch (also derives from Auditable) such that each Branch has two references to a Supplier (0 - 1). One is called BranchSupplier and one is called preBranchSupplier (the purpose of the latter being to hold a historical record of the value before the last change). I am trying to display in a Supplier detail view a list of Branches which have that Supplier. I want to list all the Branches for which BranchSupplier is the current Supplier object, but not any others, and not any that happen to have preBranchSupplier = current object. How do I set up the datagrid within a Supplier data view to show one of these relationships and not the other? If I write an XPath constraint [BranchSuppler = [%CurrentObject%]] I get a message stating that CurrentObject has to be a number. It won't let me refer to IDs. If I try to modify contexts of the dataview or the data grid I either get no Branches at all, or all the Branches in the system.
You'll probably need to use a reference in your X path constraint, something like BranchSupplier_Supplier = CurrentObject.
Furthermore, when you use dual associations between two object the context of nested datagrids must be set to 'private' (combined with the above mentioned Xpath constraints this should display the propper data)