<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: ColdFusion ORM : Performance tuning &#8211; Fetching Strategy</title>
	<atom:link href="http://www.rupeshk.org/blog/index.php/2009/09/coldfusion-orm-performance-tuning-fetching-strategy/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rupeshk.org/blog/index.php/2009/09/coldfusion-orm-performance-tuning-fetching-strategy/</link>
	<description>My Views on ColdFusion, Java and related technologies</description>
	<lastBuildDate>Mon, 26 Jul 2010 14:26:19 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Simon Lenoir</title>
		<link>http://www.rupeshk.org/blog/index.php/2009/09/coldfusion-orm-performance-tuning-fetching-strategy/comment-page-1/#comment-824</link>
		<dc:creator>Simon Lenoir</dc:creator>
		<pubDate>Wed, 17 Mar 2010 03:12:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.rupeshk.org/blog/index.php/2009/09/coldfusion-orm-performance-tuning-fetching-strategy/#comment-824</guid>
		<description>Hi Rupesh, 

It seems that Coldfusion by default doesn&#039;t use lazy loading. Is their any additional configuration to do ? In CF Admin or in the application.ormSettings ? 

By reproducing you example with lazy loading:
property name=&quot;employees&quot; fieldtype=&quot;one-to-many&quot; cfc=&quot;employee&quot; fkcolumn=&quot;deptId&quot; lazy=&quot;true&quot;;

and then doing a simple dump:




I get the array of employees with all their properties. It shouldn&#039;t be because I didn&#039;t explicitly load the array of employees.

My second concern, and it&#039;s related, is that I would like to use a bi-directional ORM relationship. If I don&#039;t use lazy loading at all, when I get the department with array of employees, each employee have a property department with his own list of employees with ... and so on... It looks like an infinitive loop of objects. How can I make sure that doesn&#039;t appends (because all this data get send to Flex).

Thanks for your help.

Simon</description>
		<content:encoded><![CDATA[<p>Hi Rupesh, </p>
<p>It seems that Coldfusion by default doesn&#8217;t use lazy loading. Is their any additional configuration to do ? In CF Admin or in the application.ormSettings ? </p>
<p>By reproducing you example with lazy loading:<br />
property name=&#8221;employees&#8221; fieldtype=&#8221;one-to-many&#8221; cfc=&#8221;employee&#8221; fkcolumn=&#8221;deptId&#8221; lazy=&#8221;true&#8221;;</p>
<p>and then doing a simple dump:</p>
<p>I get the array of employees with all their properties. It shouldn&#8217;t be because I didn&#8217;t explicitly load the array of employees.</p>
<p>My second concern, and it&#8217;s related, is that I would like to use a bi-directional ORM relationship. If I don&#8217;t use lazy loading at all, when I get the department with array of employees, each employee have a property department with his own list of employees with &#8230; and so on&#8230; It looks like an infinitive loop of objects. How can I make sure that doesn&#8217;t appends (because all this data get send to Flex).</p>
<p>Thanks for your help.</p>
<p>Simon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sumit Verma</title>
		<link>http://www.rupeshk.org/blog/index.php/2009/09/coldfusion-orm-performance-tuning-fetching-strategy/comment-page-1/#comment-781</link>
		<dc:creator>Sumit Verma</dc:creator>
		<pubDate>Fri, 22 Jan 2010 21:23:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.rupeshk.org/blog/index.php/2009/09/coldfusion-orm-performance-tuning-fetching-strategy/#comment-781</guid>
		<description>Does &quot;fetch all properties&quot; syntax works? I tried it but seems like it&#039;s silently getting ignored. 

e.g. 
from Document fetch all properties order by name

As mentioned at the end of section 14.3 here?

http://docs.jboss.org/hibernate/core/3.3/reference/en/html/queryhql.html#queryhql-joins</description>
		<content:encoded><![CDATA[<p>Does &#8220;fetch all properties&#8221; syntax works? I tried it but seems like it&#8217;s silently getting ignored. </p>
<p>e.g.<br />
from Document fetch all properties order by name</p>
<p>As mentioned at the end of section 14.3 here?</p>
<p><a href="http://docs.jboss.org/hibernate/core/3.3/reference/en/html/queryhql.html#queryhql-joins" rel="nofollow">http://docs.jboss.org/hibernate/core/3.3/reference/en/html/queryhql.html#queryhql-joins</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rupesh Kumar</title>
		<link>http://www.rupeshk.org/blog/index.php/2009/09/coldfusion-orm-performance-tuning-fetching-strategy/comment-page-1/#comment-571</link>
		<dc:creator>Rupesh Kumar</dc:creator>
		<pubDate>Sat, 19 Sep 2009 08:47:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.rupeshk.org/blog/index.php/2009/09/coldfusion-orm-performance-tuning-fetching-strategy/#comment-571</guid>
		<description>:D I know.. Batch fetching IS confusing.
I will try again. There are two parts and they are completely different.
1.  batch fetching at CFC that applies to many-to-one and one-to-one: Lets say you have defined batch-fetching on Department.cfc with size 10. And lets say you have loaded few employees in the session.
emp1 -&gt; dep1
emp2 -&gt; dep2
emp3 -&gt; dep1
emp4 -&gt; dep3
...
 When you call getDepartment() on emp1 where dept should be lazily loaded, it will load 9 other departments which are proxied in the session. So even though you called getDepartment on emp1 only, department objects dep2, dep3.. will be loaded if they are proxied (because of other employee objects in the session). This is done in anticipation that you will be accessing getDepartment for other employee objects as well.

2. Similarly for one-many and many-many, lets say you have specified the batchsize  on dept-employees relationship where emploiyees are lazily loaded, and there are 20 departments loaded in the session. When you call dept1.getEmployees(), employees for 9 other departments will also be loaded along with it. Again this is in anticipation that you will be calling getEmployees on all the department objects that are loaded.

Let me know if I confused you even more :-)</description>
		<content:encoded><![CDATA[<p> <img src='http://www.rupeshk.org/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  I know.. Batch fetching IS confusing.<br />
I will try again. There are two parts and they are completely different.<br />
1.  batch fetching at CFC that applies to many-to-one and one-to-one: Lets say you have defined batch-fetching on Department.cfc with size 10. And lets say you have loaded few employees in the session.<br />
emp1 -> dep1<br />
emp2 -> dep2<br />
emp3 -> dep1<br />
emp4 -> dep3<br />
&#8230;<br />
 When you call getDepartment() on emp1 where dept should be lazily loaded, it will load 9 other departments which are proxied in the session. So even though you called getDepartment on emp1 only, department objects dep2, dep3.. will be loaded if they are proxied (because of other employee objects in the session). This is done in anticipation that you will be accessing getDepartment for other employee objects as well.</p>
<p>2. Similarly for one-many and many-many, lets say you have specified the batchsize  on dept-employees relationship where emploiyees are lazily loaded, and there are 20 departments loaded in the session. When you call dept1.getEmployees(), employees for 9 other departments will also be loaded along with it. Again this is in anticipation that you will be calling getEmployees on all the department objects that are loaded.</p>
<p>Let me know if I confused you even more <img src='http://www.rupeshk.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Nadel</title>
		<link>http://www.rupeshk.org/blog/index.php/2009/09/coldfusion-orm-performance-tuning-fetching-strategy/comment-page-1/#comment-566</link>
		<dc:creator>Ben Nadel</dc:creator>
		<pubDate>Fri, 18 Sep 2009 20:28:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.rupeshk.org/blog/index.php/2009/09/coldfusion-orm-performance-tuning-fetching-strategy/#comment-566</guid>
		<description>I am confused about the Batching. In the example, I think what you are saying that there is one department, which has 25 employees in it (loaded lazilly).  Then, you iterate over the employees and call getDepartment() on them. Why would that call any more queries? Would the getDepartment() request simply return the department instance cached in the current session? 

Or, does the fact that  you are going more than one level deep trigger a non-lazy approach:

department::getEmployees() -- lazy load
department.getEmployees()[ 1 ].getDepartment() -- trigger deep load?

If that triggers deep load, then I assume the second getDepartment() is deep-loading the employee proxies contained within it?

Am I way off base here?

FYI - when I entered this form, it said &quot;Welcome back Ben Nadel&quot;... but, when I went to submit it, it told me my name needed to be entered (had to hit Change  and fill out form).</description>
		<content:encoded><![CDATA[<p>I am confused about the Batching. In the example, I think what you are saying that there is one department, which has 25 employees in it (loaded lazilly).  Then, you iterate over the employees and call getDepartment() on them. Why would that call any more queries? Would the getDepartment() request simply return the department instance cached in the current session? </p>
<p>Or, does the fact that  you are going more than one level deep trigger a non-lazy approach:</p>
<p>department::getEmployees() &#8212; lazy load<br />
department.getEmployees()[ 1 ].getDepartment() &#8212; trigger deep load?</p>
<p>If that triggers deep load, then I assume the second getDepartment() is deep-loading the employee proxies contained within it?</p>
<p>Am I way off base here?</p>
<p>FYI &#8211; when I entered this form, it said &#8220;Welcome back Ben Nadel&#8221;&#8230; but, when I went to submit it, it told me my name needed to be entered (had to hit Change  and fill out form).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ColdFusion ORM : Performance tuning &#8211; Lazy loading &#124; ColdFused?</title>
		<link>http://www.rupeshk.org/blog/index.php/2009/09/coldfusion-orm-performance-tuning-fetching-strategy/comment-page-1/#comment-529</link>
		<dc:creator>ColdFusion ORM : Performance tuning &#8211; Lazy loading &#124; ColdFused?</dc:creator>
		<pubDate>Fri, 11 Sep 2009 13:29:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.rupeshk.org/blog/index.php/2009/09/coldfusion-orm-performance-tuning-fetching-strategy/#comment-529</guid>
		<description>[...] Presentations                   &#171; ColdFusion ORM : Performance tuning &#8211; Fetching Strategy [...]</description>
		<content:encoded><![CDATA[<p>[...] Presentations                   &laquo; ColdFusion ORM : Performance tuning &#8211; Fetching Strategy [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
