<?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: Define Computed properties (formula attribute)</title>
	<atom:link href="http://www.manjukiran.net/2009/07/18/coldfusion-orm-define-computed-properties-formula-attribute/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.manjukiran.net/2009/07/18/coldfusion-orm-define-computed-properties-formula-attribute/</link>
	<description></description>
	<lastBuildDate>Fri, 30 Jul 2010 19:03:28 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Raymond Camden</title>
		<link>http://www.manjukiran.net/2009/07/18/coldfusion-orm-define-computed-properties-formula-attribute/comment-page-1/#comment-2643</link>
		<dc:creator>Raymond Camden</dc:creator>
		<pubDate>Sat, 21 Nov 2009 17:25:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.manjukiran.net/2009/07/18/coldfusion-orm-define-computed-properties-formula-attribute/#comment-2643</guid>
		<description>Forgive me - stupid mistake on my part. I forgot to refresh ORM for the application.</description>
		<content:encoded><![CDATA[<p><!--INFOLINKS_ON-->Forgive me &#8211; stupid mistake on my part. I forgot to refresh ORM for the application.<!--INFOLINKS_OFF--></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raymond Camden</title>
		<link>http://www.manjukiran.net/2009/07/18/coldfusion-orm-define-computed-properties-formula-attribute/comment-page-1/#comment-2642</link>
		<dc:creator>Raymond Camden</dc:creator>
		<pubDate>Sat, 21 Nov 2009 17:06:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.manjukiran.net/2009/07/18/coldfusion-orm-define-computed-properties-formula-attribute/#comment-2642</guid>
		<description>Ok, something wonky is up. I added data so I should get 1 back, but I&#039;m getting an empty string back. I checked my HQL logging and no db call is being made.</description>
		<content:encoded><![CDATA[<p><!--INFOLINKS_ON-->Ok, something wonky is up. I added data so I should get 1 back, but I&#8217;m getting an empty string back. I checked my HQL logging and no db call is being made.<!--INFOLINKS_OFF--></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raymond Camden</title>
		<link>http://www.manjukiran.net/2009/07/18/coldfusion-orm-define-computed-properties-formula-attribute/comment-page-1/#comment-2641</link>
		<dc:creator>Raymond Camden</dc:creator>
		<pubDate>Sat, 21 Nov 2009 16:49:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.manjukiran.net/2009/07/18/coldfusion-orm-define-computed-properties-formula-attribute/#comment-2641</guid>
		<description>Query - this seems to work ok, but I notice that when I have no data in the related table, I get back an empty string. Shouldn&#039;t the count always return 0?</description>
		<content:encoded><![CDATA[<p><!--INFOLINKS_ON-->Query &#8211; this seems to work ok, but I notice that when I have no data in the related table, I get back an empty string. Shouldn&#8217;t the count always return 0?<!--INFOLINKS_OFF--></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manjukiran</title>
		<link>http://www.manjukiran.net/2009/07/18/coldfusion-orm-define-computed-properties-formula-attribute/comment-page-1/#comment-2490</link>
		<dc:creator>Manjukiran</dc:creator>
		<pubDate>Thu, 20 Aug 2009 08:08:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.manjukiran.net/2009/07/18/coldfusion-orm-define-computed-properties-formula-attribute/#comment-2490</guid>
		<description>Tom, the SQL that gets generated is a parameterised query.  But, even otherwise, I do not see any scope for injecting SQL as the SQL is just available in the metadata.</description>
		<content:encoded><![CDATA[<p><!--INFOLINKS_ON-->Tom, the SQL that gets generated is a parameterised query.  But, even otherwise, I do not see any scope for injecting SQL as the SQL is just available in the metadata.<!--INFOLINKS_OFF--></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Chiverton</title>
		<link>http://www.manjukiran.net/2009/07/18/coldfusion-orm-define-computed-properties-formula-attribute/comment-page-1/#comment-2480</link>
		<dc:creator>Tom Chiverton</dc:creator>
		<pubDate>Tue, 18 Aug 2009 12:07:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.manjukiran.net/2009/07/18/coldfusion-orm-define-computed-properties-formula-attribute/#comment-2480</guid>
		<description>Cool. I assume when it runs the sql snippit it is a nice parametrised non-sql injecting query ?</description>
		<content:encoded><![CDATA[<p><!--INFOLINKS_ON-->Cool. I assume when it runs the sql snippit it is a nice parametrised non-sql injecting query ?<!--INFOLINKS_OFF--></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manjukiran</title>
		<link>http://www.manjukiran.net/2009/07/18/coldfusion-orm-define-computed-properties-formula-attribute/comment-page-1/#comment-2299</link>
		<dc:creator>Manjukiran</dc:creator>
		<pubDate>Fri, 24 Jul 2009 10:21:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.manjukiran.net/2009/07/18/coldfusion-orm-define-computed-properties-formula-attribute/#comment-2299</guid>
		<description>Yes, John - you can have complex formulas like the one above.</description>
		<content:encoded><![CDATA[<p><!--INFOLINKS_ON-->Yes, John &#8211; you can have complex formulas like the one above.<!--INFOLINKS_OFF--></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Whish</title>
		<link>http://www.manjukiran.net/2009/07/18/coldfusion-orm-define-computed-properties-formula-attribute/comment-page-1/#comment-2298</link>
		<dc:creator>John Whish</dc:creator>
		<pubDate>Fri, 24 Jul 2009 10:10:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.manjukiran.net/2009/07/18/coldfusion-orm-define-computed-properties-formula-attribute/#comment-2298</guid>
		<description>Interesting. If I&#039;m right, essentially this is shorthand for doing,

  /**
  * I return the number of items sold for this artist
  * @output false
  */
  public numeric function getNumberOfArts()
  {
    return ORMExecuteQuery( 
      &quot;select Count(*) from Art art where art.ArtistId=:ArtistID&quot;, 
      { ArtistID=this.getArtistID() }
      , True );
  }

Can you do more complex formulas for example:

property name=&quot;numberOfSoldArts&quot; 
  formula=&quot;select Count(*) from Art art where art.ArtistId=ArtistId and art.IsSold=True&quot;;</description>
		<content:encoded><![CDATA[<p><!--INFOLINKS_ON-->Interesting. If I&#8217;m right, essentially this is shorthand for doing,</p>
<p>  /**<br />
  * I return the number of items sold for this artist<br />
  * @output false<br />
  */<br />
  public numeric function getNumberOfArts()<br />
  {<br />
    return ORMExecuteQuery(<br />
      &#8220;select Count(*) from Art art where art.ArtistId=:ArtistID&#8221;,<br />
      { ArtistID=this.getArtistID() }<br />
      , True );<br />
  }</p>
<p>Can you do more complex formulas for example:</p>
<p>property name=&#8221;numberOfSoldArts&#8221;<br />
  formula=&#8221;select Count(*) from Art art where art.ArtistId=ArtistId and art.IsSold=True&#8221;;<!--INFOLINKS_OFF--></p>
]]></content:encoded>
	</item>
</channel>
</rss>
