I created a relationship using studio, so that I can see how to write the custom code. Then I change the needed variables to the correct name.
Example: contacts_lev_contracts_1 to contacts_lev_contracts_billing_contact
I have noticed that the code created in the following files is the same and seem to override another. Where is the best place to put the MetaData?
I am doing this in Sugar 6.5, but I believe a Sugar 7 answer should also be relevant.