I was looking at the doSelectJoin* functions that torque generates, and I
think either I don't understand something or perhaps there is a bug.

I was looking over Torque to decide if it would be worth using, and I was
thinking that I would probably need to write several of my own
doSlectJoin*** style methods, because I have lots of queries which join more
than two tables.

Anyway I was reading through the code generated by the example bookstore
schema, and in the example's generated code there is a method
doSelectJoinAuthor() in the file BaseBookPeer.java.

doSelectJoin Author executes a query which joins the Book and the Author
table.  Then it steps through each row returned by the query building a book
object and an author object.  Then it seems to me that the setAuthor()
method of the book object should be called to set the author.  Otherwise the
Author object that is created is never assigned to anything, and the first
time the getAuthor() method of the Book object is called another database
query will be run.

Do I have that right or am I missing something?

Thanks,

Dave


--
To unsubscribe, e-mail:   <mailto:turbine-torque-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-torque-user-help@;jakarta.apache.org>

Reply via email to