My understanding is that if in the XML schema the foreign key relation is defined Torque
will generate a protected method in BaseContactPeer doSelectCotactJoinByPhoneNumbers() (or something like that)
So all that needs to be done is to make it public in ContactPeer.
This is not true any more? I know i have used this feature of Torque (3.0 and 3.1) several times.
Best regards, Andras.
Thomas Fischer wrote:
Hi,
You can overwrite the doSelect Methods of your choice in ContactPeer to access the PhoneNumbers. This automatically loads the phone numbers for the Contact. For example, in ContactPeer you could use
public List doSelect(Criteria criteria, Connection connection) { List result = super.doSelect(criteria, connection); Iterator contactIt = result.iterator(); while(contactIt.hasNext()) { Contact contact = (Contact) contactIt.next(); contact.getPhoneNumbers(connection); } return result; }
Do not forget to overwrite the doSelect methods with other signatures if you use them.
Thomas
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]