Quick background... I have several tables, like "tblAddress" that will have records belonging to multiple entities (Customer, Client, etc.), therefore there is no actual relationship defined to any particular table on the database. What I did was create a "tblBelongsTo", which contains the entities that can use this data and in my data table, in this case "tblAddress", I include both fk_parent (ID of the owner) and fk_belongs_to (ID of the BelongsTo table)... The combination of these 2 columns allow me to house all addresses in one centralized location and retrieve them by doing a query of, for example, all addresses where fk_parent=1000 and fk_belongs_to=1000 (Customer) to get all the addresses for a particular customer, etc.
These are my definitions and below you'll see my problem. <package name="address"> <object name="address" table="tblAddress" decorator="path.to.address"> <id name="address_id" type="numeric" /> <property name="fk_parent" type="numeric" column="fk_parent" /> <property name="company_name" type="string" column="company_name" nullable="true" /> <property name="address1" type="string" column="address1" /> <property name="address2" type="string" column="address2" nullable="true" /> <property name="city" type="string" column="city" /> <property name="state" type="string" column="state" /> <property name="postal_code" type="string" column="postal_code" /> <property name="country" type="string" column="country" /> <property name="is_residential" type="numeric" column="is_residential" nullable="true" nullvalue="999" /> <property name="is_active" type="numeric" column="is_active" nullable="true" nullvalue="999" /> <manytoone name="BelongsTo"> <link to="belongsto.BelongsTo" column="fk_belongs_to" /> </manytoone> </object> </package> <package name="belongsto"> <object name="BelongsTo" table="tblBelongsTo"> <id name="belongs_to_id" type="numeric" /> <property name="belongs_to" type="string" column="belongs_to" /> </object> </package> ==== HERE IS THE PROBLEM ==== <package name="client"> <object name="client" table="tblClient" decorator="path.to.client"> <id name="client_id" type="numeric" /> <property name="client_name" type="string" column="client_name" /> <property name="referred_by" type="numeric" column="referred_by" nullable="true" nullvalue="999" /> <property name="is_active" type="numeric" column="is_active" nullvalue="999" /> <onetomany name="Address" lazy="false"> <link to="address.address" column="fk_parent" /> <collection type="array"> ==== HERE EXACTLY ==== <condition property="fk_belongs_to" value="1000" /> <order property="address1" order="asc" /> </collection> </onetomany> </object> </package> How can I make the condition work?? Any ideas?? Thank you. -- Before posting questions to the group please read: http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer Try out the new Transfer ORM Custom Google Search: http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8 You received this message because you are subscribed to the Google Groups "transfer-dev" group. To post to this group, send email to transfer-dev@googlegroups.com To unsubscribe from this group, send email to transfer-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/transfer-dev?hl=en