I’m writing a class to hold additional user data. here’s the (simplified) schema:
<?xml version="1.0" encoding="UTF-8"?>
<model package="clientdetails" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" phpdoc-package="clientdetails" phpdoc-subpackage="model">
<object class="clientData" table="user_clients" extends="xPDOSimpleObject">
<field key="internalKey" dbtype="int" precision="10" phptype="integer" null="false" default="" attributes="unsigned" />
<field key="firstName" dbtype="varchar" precision="100" phptype="string" null="false" default="" />
<field key="lastName" dbtype="varchar" precision="100" phptype="string" null="false" default="" />
<aggregate alias="User" class="modUser" local="internalKey" foreign="id" cardinality="one" owner="foreign" />
</object>
</model>
When i remove a user, the related rows aren’t removed from my
user_clients table. However, if i change the relationship to "composite" and delete the clientData row, then the user will be removed. But that’s not how i want this to function.
Is the only way to get this to work correctly to add a relationship to the modx schema and rebuild it?? ...i hope not.
I can’t figure out what i’m doing wrong (or
if i’m doing anything wrong for that matter)
-- neil