You need to specify Foreign key definitions in your project xml file you use for 
Torque.
Then these methods are automatically generated.

Frank
  ----- Original Message ----- 
  From: Britta Ladwig-Attinger 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, June 14, 2001 12:57
  Subject: RE: Join example


  Hi,

  actually in my code generated by Torque there is no method:

  TableAPeer.doSelectJoinTableB (crit)

  That's why I used my code.
  Anything wrong with my Torque generation??
  (TDK 2.1b4)

  Britta


  -----Original Message-----
  From: Leon Messerschmidt [mailto:[EMAIL PROTECTED]]
  Sent: Donnerstag, 14. Juni 2001 08:24
  To: [EMAIL PROTECTED]
  Subject: Re: Join example


  > Hi Britta
  >
  > > try the following code, works fine for me:
  > >
  > > First extend one's the the 2 tables Base file, e.g. BaseTableA.java;
  > > implement in that class the get's and set's for all columns from
  > > TableB:
  >
  > [snip]
  >
  > I understand your code (I think), but is this really necessary?
  > I get the impression that torque will generate the appropriate
  > code to do a select with a join. In fact, Leon Messerschmidt
  > posted an example which goes like this:
  >
  >   Criteria crit = new Criteria();
  >   crit.add (TABLEA.id, TABLEB.id);
  >   List aObjects = TableAPeer.doSelectJoinTableB (crit);
  >
  > where it looks as if the doSelectJoinTableB() method would have
  > been generated by torque (Leon, is that right)

  Yes, it is generated.

  > Do you maintain
  > this is not the correct solution?

  Actually it works the same as Ethan's doSelectWithLineItem() method.  It is
  probably safer to use the generated method, for your code will make use of
  possible future enhancements.

  ~ Leon


  ---------------------------------------------------------------------
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


  ---------------------------------------------------------------------
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to