<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "PHP DBVA RElationships not working properly"]]></title>
		<link>http://forums.visual-paradigm.com/posts/32.html</link>
		<description><![CDATA[Latest messages posted in the topic "PHP DBVA RElationships not working properly"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>PHP DBVA RElationships not working properly</title>
				<description><![CDATA[ I designed a website pretty much around users and user permissions with DBVA-PHP Edition<br> <br> What im trying to do seems like it should work.. I created a permission via this script<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> &lt;?
 include "config.php";
 
 &#36;user = UsersDAO::loadUsersByORMID&#40;1&#41;;
 echo &#36;user . "&lt;hr&gt;";
 &#36;permType = Permision_typesDAO::createPermision_types&#40;&#41;;
 &#36;permType-&gt;setDescription&#40;'modules'&#41;;
 Permision_typesDAO::save&#40;&#36;permType&#41;;
 echo &#36;permType . "&lt;hr&gt;";
 &#36;cperm = PermissionDAO::createPermission&#40;&#41;;
 &#36;cperm-&gt;setPermision_typespermissiontype&#40;&#36;permType&#41;;
 &#36;cperm-&gt;setDescription&#40;'news'&#41;;
 PermissionDAO::save&#40;&#36;cperm&#41;;
 echo &#36;cperm . "&lt;hr&gt;";
 &#36;perms = User_permissionsDAO::createUser_permissions&#40;&#41;;
 &#36;perms-&gt;setPermission&#40;&#36;cperm&#41;;
 &#36;perms-&gt;setUser&#40;&#36;user&#41;;
 User_permissionsDAO::save&#40;&#36;perms&#41;;
 echo &#36;perms . "&lt;hr&gt;";
 echo &#36;user . "&lt;hr&gt;";
 ?&gt; </pre></td>
		</tr>
		</table> <br> <br> <br> Then when I want to get a users User_permissions, i should be able to load the user and then type &#36;user->getPermissions();<br> <br> However that doesnt work so i tried a different method, load all User_Permissions and compare user objects.<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> 			
 &#36;userperms = User_permissionsDAO::listUser_permissionsByQuery&#40;null,null&#41;;
 foreach&#40;&#36;userperms as &#36;line&#41;
 {
       print &#36;line;
 }
  </pre></td>
		</tr>
		</table> <br> Gives me a <br> <br> User_permissions[user_permissionid=1 user=null permission=null created=0 created_by=0 updated=0 updated_by=0 deleted=0 deleted_by=0 ]User_permissions[user_permissionid=2 user=null permission=null created=0 created_by=0 updated=0 updated_by=0 deleted=0 deleted_by=0 ]<br> <br> <br> And in my database, I can see, userid = 1;<br> <br> If anyone wants me to attach the ERD let me know.]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/2675#20236.html</guid>
				<link>http://forums.visual-paradigm.com/posts/2675#20236.html</link>
				<pubDate><![CDATA[Mon, 19 Nov 2007 02:58:44]]></pubDate>
				<author><![CDATA[ nomspes@gmail.com]]></author>
			</item>
			<item>
				<title>Re:PHP DBVA RElationships not working properly</title>
				<description><![CDATA[ Hi nomspes,<br> <br> Thank you for your post. Please send us your project file for reproducing the problem. Please send to my Email address at:<br> <a href="mailto:jick@visual-paradigm.com">jick@visual-paradigm.com</a><br> <br> Best regards,<br> Jick<br> ]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/2675#20248.html</guid>
				<link>http://forums.visual-paradigm.com/posts/2675#20248.html</link>
				<pubDate><![CDATA[Mon, 19 Nov 2007 17:20:40]]></pubDate>
				<author><![CDATA[ Jick]]></author>
			</item>
	</channel>
</rss>