You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by tf...@apache.org on 2012/10/25 22:20:16 UTC
svn commit: r1402320 -
/db/torque/torque4/trunk/torque-site/src/site/xdoc/tutorial/orm/step5.xml
Author: tfischer
Date: Thu Oct 25 20:20:16 2012
New Revision: 1402320
URL: http://svn.apache.org/viewvc?rev=1402320&view=rev
Log:
TORQUE-235: fix Bugs in tutorial
Modified:
db/torque/torque4/trunk/torque-site/src/site/xdoc/tutorial/orm/step5.xml
Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/tutorial/orm/step5.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/tutorial/orm/step5.xml?rev=1402320&r1=1402319&r2=1402320&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/tutorial/orm/step5.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/tutorial/orm/step5.xml Thu Oct 25 20:20:16 2012
@@ -284,11 +284,9 @@ for (Book book : books)
to <em>true</em> when generating the classes.
<br/>
As an alternative, for selects using joins,
- there are the following
- <em>protected</em> methods in the BasePeer
- classes whose tables contain foreign-keys:
- <em>doSelectJoinTable</em> where
- <em>Table</em> is the name of the
+ there are the <em>doSelectJoin${table}</em> methods
+ in the BasePeer classes whose tables contain foreign-keys,
+ where <em>${table}</em> is the name of the
foreign-key table. This method efficiently
queries the database (using a single join
query) and automatically populates all of
@@ -298,15 +296,14 @@ for (Book book : books)
example, <em>doSelectJoinAuthor</em> and
<em>doSelectJoinPublisher</em> were
generated in the <em>BaseBookPeer</em> class
- that <em>BookPeer</em> extends. As a
- reminder, to use these convenience methods,
- you must provide <em>public</em> members to
- <em>BookPeer</em> for clients because they
- are <em>protected</em> in
- <em>BaseBookPeer</em>. Unfortunately,
+ that <em>BookPeer</em> extends.
Torque does not generate a
<em>doSelectJoinAll</em> or
- <em>doSelectJoinAuthorPublisher</em> method.
+ <em>doSelectJoinAuthorPublisher</em> method,
+ because these methods would be inefficient for a large number
+ of associated objects
+ (n authors and m publishers per book would result in n*m rows
+ per book, where n+m rows should suffice. Imagine n=100 and m=100...)
</td>
</tr>
</table>
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org