<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Sample query to use with XXXFactory.LoadXXXByQuery(...,...)"]]></title>
		<link>http://forums.visual-paradigm.com/posts/33.html</link>
		<description><![CDATA[Latest messages posted in the topic "Sample query to use with XXXFactory.LoadXXXByQuery(...,...)"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Sample query to use with XXXFactory.LoadXXXByQuery(...,...)</title>
				<description><![CDATA[ I am trying to load an object using the generated LoadXXXByQuery. But I could not get it to understand my query string.<br> <br> Example,<br> <br>  <table class="code-table-simple" align="center">
		<tr> 
		<td><span class="genmed"><b>Code:</b></span></td>
		</tr>
		</table>
		<table class="code-table" align="center">
		<tr>
		<td class="code">
		<pre> 
 Car car = CarFactory.LoadCarByQuery&#40;"where car.Owner.ORMID = '1'", null&#41;
  </pre></td>
		</tr>
		</table> <br> <br> Basically I am trying to get a car owned by a specific Owner. But NHibernate keeps throwing exception like so..<br> <br>  <table class="code-table-simple" align="center">
		<tr> 
		<td><span class="genmed"><b>Code:</b></span></td>
		</tr>
		</table>
		<table class="code-table" align="center">
		<tr>
		<td class="code">
		<pre> 
 could not resolve property:Owner of :Lesen.Car &#91;From Lesen.Car as Car Where Car.Owner.ORMID = '1'&#93;
  </pre></td>
		</tr>
		</table><br> <br> Lesen is the package name for my classes.<br> <br> Any code sample that explains how to use this function would be good.]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/2085#16618.html</guid>
				<link>http://forums.visual-paradigm.com/posts/2085#16618.html</link>
				<pubDate><![CDATA[Fri, 13 Apr 2007 17:22:02]]></pubDate>
				<author><![CDATA[ rosdikasim@gmail.com]]></author>
			</item>
			<item>
				<title>Re:Sample query to use with XXXFactory.LoadXXXByQuery(...,...)</title>
				<description><![CDATA[ Hello rosdikasim,<br> <br> Try this:<br> <br> Car car = CarFactory.LoadCarByQuery("Car.owner.id = 1", null);<br> <br> PS. Notice that the statement is case sensitive. We assume that Car starts with capital letter 'C', and owner starts with small letter 'o'.<br> <br> Best regards,<br> Jick]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/2085#16638.html</guid>
				<link>http://forums.visual-paradigm.com/posts/2085#16638.html</link>
				<pubDate><![CDATA[Sat, 14 Apr 2007 09:46:23]]></pubDate>
				<author><![CDATA[ Jick]]></author>
			</item>
			<item>
				<title>Sample query to use with XXXFactory.LoadXXXByQuery(...,...)</title>
				<description><![CDATA[ Duh!.. I didnt realize that I am supposed to refer to the "name" property in the mapping file and not the class name!<br> <br> So the correct query is "Car.ORM_Owner.Id = 1"<br> <br> Everything work fine now. TQ.]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/2085#16645.html</guid>
				<link>http://forums.visual-paradigm.com/posts/2085#16645.html</link>
				<pubDate><![CDATA[Sat, 14 Apr 2007 20:23:14]]></pubDate>
				<author><![CDATA[ rosdikasim@gmail.com]]></author>
			</item>
			<item>
				<title>Re:Sample query to use with XXXFactory.LoadXXXByQuery(...,...)</title>
				<description><![CDATA[ You are welcome!  :-o ]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/2085#16657.html</guid>
				<link>http://forums.visual-paradigm.com/posts/2085#16657.html</link>
				<pubDate><![CDATA[Mon, 16 Apr 2007 08:40:58]]></pubDate>
				<author><![CDATA[ Jick]]></author>
			</item>
	</channel>
</rss>