<rss version="2.0">
		<channel>
			<title>Akelos PHP Framework Forum - find, has_one association, errors</title>
			<lastBuildDate>Mon, 06 Sep 2010 10:14:01 +0200</lastBuildDate>
			<link>http://forum.akelos.org/</link>
			<description></description>
			<generator>
				Lussumo Vanilla 1.1.4 &amp; Feed Publisher
			</generator>
			<item>
		<title>find, has_one association, errors</title>
		<link>http://forum.akelos.org/discussion/686/?Focus=2872#Comment_2872</link>
		<guid isPermaLink="false">http://forum.akelos.org/discussion/686/?Focus=2872#Comment_2872</guid>
		<pubDate>Sat, 15 Nov 2008 21:22:29 +0100</pubDate>
		<author>bloogrox</author>
		<description>
			<![CDATA[ Hi!<br />i have model User, User $has_one Wallet<br />code:<br />$Wallet = $_User-&gt;wallet-&gt;find(); // i want to retrieve wallet object associated to user <br />raises:<br /> Notice: Tried 'SELECT wallets.* FROM wallets LEFT OUTER JOIN users ON users.id = wallets.user_id WHERE wallets.user_id = '12' AND ( __owner.type = 'User' ) '. Got: [1054] Unknown column '__owner.type' in 'where clause' in C:\xampp\htdocs\showbirja\lib\AkActiveRecord\AkDbAdapter.php on line 226<br /><br />i copy paste this sql to sqlmanager and execute,<br />without &quot;AND ( __owner.type = 'User' )&quot; it works fine<br /><br />is it bug?<br />how could i get over it ?<br /><br />thnx! ]]>
		</description>
	</item>
	<item>
		<title>find, has_one association, errors</title>
		<link>http://forum.akelos.org/discussion/686/?Focus=2885#Comment_2885</link>
		<guid isPermaLink="false">http://forum.akelos.org/discussion/686/?Focus=2885#Comment_2885</guid>
		<pubDate>Tue, 18 Nov 2008 10:30:22 +0100</pubDate>
		<author>suthern</author>
		<description>
			<![CDATA[ <p>If each user has only one wallet, (Table user has 'wallet_id'), what about using
<code>$Wallet = $_User-&gt;wallet-&gt;load();</code></p>
 ]]>
		</description>
	</item>
	<item>
		<title>find, has_one association, errors</title>
		<link>http://forum.akelos.org/discussion/686/?Focus=2887#Comment_2887</link>
		<guid isPermaLink="false">http://forum.akelos.org/discussion/686/?Focus=2887#Comment_2887</guid>
		<pubDate>Tue, 18 Nov 2008 16:29:32 +0100</pubDate>
		<author>bloogrox</author>
		<description>
			<![CDATA[ and what if <br />Table wallet has 'user_id', but<br />table user doesn't have 'wallet_id'. ]]>
		</description>
	</item>
	<item>
		<title>find, has_one association, errors</title>
		<link>http://forum.akelos.org/discussion/686/?Focus=3457#Comment_3457</link>
		<guid isPermaLink="false">http://forum.akelos.org/discussion/686/?Focus=3457#Comment_3457</guid>
		<pubDate>Tue, 22 Jun 2010 17:39:26 +0200</pubDate>
		<author>suthern</author>
		<description>
			<![CDATA[ <p>BlooGrox, this thread is a couple of years old. Are you still around? Sorry I never saw your response.</p>

<p>Putting the user_id inside the schema wallet is interesting. As long as you have defined your models correctly (Has_one and belongs_to), then</p>

<pre><code>$this-&gt;User-&gt;wallet-&gt;load();
</code></pre>

<p>should work just fine.</p>
 ]]>
		</description>
	</item>
	
		</channel>
	</rss>