Yes but don't set the class name to be the same as the composite alias name.
Use MODx, or the cat gets it!
I'm afraid that's not doing the trick either...
Try this :-
<?xml version="1.0" encoding="UTF-8"?>
<model package="ledenlijst" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM">
<object class="ClubLid" table="users" extends="modUser">
<composite alias="LedenlijstLid" class="myLedenlijstLid" local="id" foreign="user" cardinality="one" owner="local" />
</object>
<object class="myLedenlijstLid" table="ledenlijst" extends="xPDOObject">
<field key="user" dbtype="int" phptype="integer" null="false" default="0" index="unique"/>
<!-- The id is 'YYYYMMDD' . md5(naam . voornaam); this should be adequate to providing unique ids -->
<field key="id" dbtype="varchar" precision="40" phptype="string" null="false" />
<field key="naam" dbtype="varchar" precision="255" phptype="string" null="false" default=""/>
<field key="voornaam" dbtype="varchar" precision="255" phptype="string" null="false" default=""/>
<field key="email" dbtype="varchar" precision="255" phptype="string" null="true" />
<!-- other field definitions come here -->
<aggregate alias="ClubLid" class="ClubLid" local="user" foreign="id" cardinality="one" owner="foreign" />
</object>
</model>
[ed. note: opengeek last edited this post 14 years, 7 months ago.]
Use MODx, or the cat gets it!
Or even this :-
<?xml version="1.0" encoding="UTF-8"?>
<model package="ledenlijst" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM">
<object class="ClubLid" table="users" extends="modUser">
<composite alias="LedenlijstLid" class="myLedenlijstLid" local="id" foreign="user" cardinality="one" owner="local" />
</object>
<object class="myLedenlijstLid" table="ledenlijst" extends="xPDOObject">
<field key="user" dbtype="int" phptype="integer" null="false" default="0" index="unique"/>
<!-- The id is 'YYYYMMDD' . md5(naam . voornaam); this should be adequate to providing unique ids -->
<field key="id" dbtype="varchar" precision="40" phptype="string" null="false" />
<field key="naam" dbtype="varchar" precision="255" phptype="string" null="false" default=""/>
<field key="voornaam" dbtype="varchar" precision="255" phptype="string" null="false" default=""/>
<field key="email" dbtype="varchar" precision="255" phptype="string" null="true" />
<!-- other field definitions come here -->
<aggregate alias="ClubLid" class="ClubLid" local="user" foreign="id" cardinality="one" owner="foreign" />
</object>
</model>
[ed. note: opengeek last edited this post 14 years, 7 months ago.]
Use MODx, or the cat gets it!
Do you use code-brackets when posting?
All your posts seem to be corrupted.
OK, paste is not working in any browser I pick, if you send me a mail address I'll mail you back.
Use MODx, or the cat gets it!