We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38282
    • 12 Posts
    So I've changed the composite line to
    <composite alias="LedenlijstLid" class="LedenlijstLid" local="id" foreign="user" cardinality="one" owner="local" />

    But still no effect.
      • 26903
      • 1,336 Posts
      Yes but don't set the class name to be the same as the composite alias name.
        Use MODx, or the cat gets it!
        • 38282
        • 12 Posts
        I'm afraid that's not doing the trick either...
          • 26903
          • 1,336 Posts
          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!
            • 26903
            • 1,336 Posts
            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!
              • 38282
              • 12 Posts
              Do you use code-brackets when posting?
              All your posts seem to be corrupted.
                • 26903
                • 1,336 Posts
                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!