db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andras Balogh <and...@reea.net>
Subject Re: Arrays in OM classes
Date Tue, 22 Feb 2005 16:09:18 GMT
Hello Thomas,
   
    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: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message