> -----Urspr�ngliche Nachricht-----
> Von: Post, Andreas (FF) [mailto:andreas.post@;t-systems.com]
> Gesendet: Mittwoch, 23. Oktober 2002 10:56
> An: '[EMAIL PROTECTED]'
> Betreff: BasePeer.executeQuery and #foreach
>
>
> Hello !
>
> I need some help for a simple question, I guess.
> Because I have a very tricky "join,group by" Statement, I want to do it
> without criteria.
>
> I m using the following, and it works:
>
> List L=BasePeer.executeQuery("SELECT a,b FROM TABLE");
Usually you query not the BasePeer, but your business object(BO) Peer class,
like
MyboPeer.executeQuery("SELECT...");
> context.put("list", L);
>
> but I can�t get the elements in the template:
>
> #foreach ( $row in $list )
> $row.a
> $row.b
> #end
> That would be beautiful, but it doesn't work.
It does so, provided that your BO has getter-methods that correspond to the
fields of your table. BOs generated by Torque provide these methods
automatically.
HTH.
Marc
--
To unsubscribe, e-mail: <mailto:turbine-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-user-help@;jakarta.apache.org>