<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Bug in PHP code generation"]]></title>
		<link>http://forums.visual-paradigm.com/posts/32.html</link>
		<description><![CDATA[Latest messages posted in the topic "Bug in PHP code generation"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Bug in PHP code generation</title>
				<description><![CDATA[ I noticed that if I create an entity with a composite key, the loadByORMID method that is automatically generated contains a bug:<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>   
 public static function loadUserByORMID&#40;&#36;name, &#36;company&#41; {
     &#36;m = epManager :: instance&#40;&#41;;
     &#36;user = &#36;m-&gt;create&#40;'User'&#41;;
     &#36;user-&gt;name = &#36;name;
     &#36;users = &#36;m-&gt;find&#40;&#36;user&#41;;
     &#36;userValues = array_values&#40;&#36;users&#41;;
     return &#36;userValues&#91;0&#93;;
     &#36;user-&gt;company = &#36;company;
     &#36;users = &#36;m-&gt;find&#40;&#36;user&#41;;
     &#36;userValues = array_values&#40;&#36;users&#41;;
     return &#36;userValues&#91;0&#93;;
   } </pre></td>
		</tr>
		</table> <br> <br> As you can see the function signature correctly contains both pieces of the composite key.  However, the code generator in DBVA is trying to perform two separate searches, one for each half of the key when in fact it should be searching for both halves at the same time as in the following example which I coded by hand:<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>   public static function loadUserByORMID&#40;&#36;name, &#36;company&#41; {
     &#36;m = epManager :: instance&#40;&#41;;
     &#36;user = &#36;m-&gt;create&#40;'User'&#41;;
     &#36;user-&gt;name = &#36;name;
     &#36;user-&gt;company = &#36;company;
     &#36;users = &#36;m-&gt;find&#40;&#36;user&#41;;
     &#36;userValues = array_values&#40;&#36;users&#41;;
     return &#36;userValues&#91;0&#93;;
   } </pre></td>
		</tr>
		</table> <br> <br> Any idea how long this might take to fix?]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/2653#20163.html</guid>
				<link>http://forums.visual-paradigm.com/posts/2653#20163.html</link>
				<pubDate><![CDATA[Wed, 14 Nov 2007 10:32:53]]></pubDate>
				<author><![CDATA[ rbegga]]></author>
			</item>
			<item>
				<title>Re:Bug in PHP code generation</title>
				<description><![CDATA[ Hello rbegga,<br> <br> I'll talk to our engineers and answer your qusetion asap.<br> <br> Best regards,<br> Jick<br> ]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/2653#20172.html</guid>
				<link>http://forums.visual-paradigm.com/posts/2653#20172.html</link>
				<pubDate><![CDATA[Wed, 14 Nov 2007 18:25:20]]></pubDate>
				<author><![CDATA[ Jick]]></author>
			</item>
			<item>
				<title>Re:Bug in PHP code generation</title>
				<description><![CDATA[ Jick,<br> <br> Thanks for looking into this I really appreciate it.  Also, I am not sure if you saw my other post regarding transactions in PHP but I'm hoping maybe engineering has an idea there as well? I really need to be able to use transactions in my applicaitons.<br> <br> -TJ]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/2653#20185.html</guid>
				<link>http://forums.visual-paradigm.com/posts/2653#20185.html</link>
				<pubDate><![CDATA[Thu, 15 Nov 2007 07:19:51]]></pubDate>
				<author><![CDATA[ rbegga]]></author>
			</item>
			<item>
				<title>Re:Bug in PHP code generation</title>
				<description><![CDATA[ Hi rbegga,<br> <br> This is a bug. We will fix it and send you a patch tomorrow.<br> <br> Best regards,<br> Jick<br> ]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/2653#20195.html</guid>
				<link>http://forums.visual-paradigm.com/posts/2653#20195.html</link>
				<pubDate><![CDATA[Thu, 15 Nov 2007 19:06:43]]></pubDate>
				<author><![CDATA[ Jick]]></author>
			</item>
			<item>
				<title>Re:Bug in PHP code generation</title>
				<description><![CDATA[ Hello rbegga,<br> <br> Sorry for my late reply. This is the download URL of the patch:<br> <a href="http://files3.visual-paradigm.com/200711/Patch/sp1_20071119j/VP_Suite_Windows_3_1_sp1_20071119j.exe" target="_blank" rel="nofollow">http://files3.visual-paradigm.com/200711/Patch/sp1_20071119j/VP_Suite_Windows_3_1_sp1_20071119j.exe</a><br> <br> Please try it out.<br> <br> Best regards,<br> Jick]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/2653#20251.html</guid>
				<link>http://forums.visual-paradigm.com/posts/2653#20251.html</link>
				<pubDate><![CDATA[Mon, 19 Nov 2007 18:13:23]]></pubDate>
				<author><![CDATA[ Jick]]></author>
			</item>
			<item>
				<title>Re:Bug in PHP code generation</title>
				<description><![CDATA[ Jick,<br> <br> I need the patch to be for the MacOS X version of DBVA to test it out.  Sorry I forgot to mention that again.<br> <br> Thanks!<br> <br> -TJ<br> ]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/2653#20254.html</guid>
				<link>http://forums.visual-paradigm.com/posts/2653#20254.html</link>
				<pubDate><![CDATA[Tue, 20 Nov 2007 05:35:25]]></pubDate>
				<author><![CDATA[ rbegga]]></author>
			</item>
			<item>
				<title>Bug in PHP code generation</title>
				<description><![CDATA[ Hello rbegga,<br> <br> Please find the Mac version at<br> <a href="http://files3.visual-paradigm.com/200711/Patch/sp1_20071119k/VP_Suite_MacOSX_3_1_sp1_20071119k.dmg" target="_blank" rel="nofollow">http://files3.visual-paradigm.com/200711/Patch/sp1_20071119k/VP_Suite_MacOSX_3_1_sp1_20071119k.dmg</a><br> <br> Best regards,<br> Rain]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/2653#20274.html</guid>
				<link>http://forums.visual-paradigm.com/posts/2653#20274.html</link>
				<pubDate><![CDATA[Wed, 21 Nov 2007 14:56:21]]></pubDate>
				<author><![CDATA[ Rain]]></author>
			</item>
			<item>
				<title>Re:Bug in PHP code generation</title>
				<description><![CDATA[ That fix seems to have worked.  Thanks!<br> <br> -TJ]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/2653#20317.html</guid>
				<link>http://forums.visual-paradigm.com/posts/2653#20317.html</link>
				<pubDate><![CDATA[Tue, 27 Nov 2007 11:11:19]]></pubDate>
				<author><![CDATA[ rbegga]]></author>
			</item>
	</channel>
</rss>