Additional JOIN condition in model properties

    If it's impossible to describe relations between model tables using means of simple relations, you can manually compose an additional JOIN condition in model properties. The condition will be added to the FOR query phrase. Use SQL standard syntax like: [LEFT OUTER ] Join table alias On alias1.field1=alias2.field2

    You can use only the aliases, which are defined for the tables of a model. For instance, if you can't build relations between a GOODS table and other tables, using standard methods, provided that the GOODS table has the alias B, then the additional JOIN condition will look like:

Join GOODS b On d.GOODS=b.CODE

where    d                - alias of INVOICE_ITEMS
            d.GOODS     - a field in INVOICE_ITEMS with a goods codes;
            b.CODE        - a key field in GOODS table


www.dataodyssey.com         Table of contents