Hmm, tried to simplify first for a better unbderstanding of what happens, and treid to join different tables in wich i actaually need one field.
Schema:
<object class="Accomodations" table="accomodations" extends="xPDOSimpleObject">
<field key="code" dbtype="varchar" precision="100" phptype="string" null="false" />
<field key="land_id" dbtype="int" precision="11" phptype="integer" null="false" />
<field key="alias" dbtype="varchar" precision="250" phptype="string" null="false" />
<field key="naam" dbtype="varchar" precision="200" phptype="string" null="false" />
<field key="plaats" dbtype="varchar" precision="200" phptype="string" null="false" />
<field key="intro" dbtype="varchar" precision="250" phptype="string" null="false" />
<field key="vanafPrijs" dbtype="decimal" precision="9,2" phptype="float" null="false" />
<field key="numberDays" dbtype="int" precision="10" phptype="integer" null="false" />
<field key="infoAlgemeen" dbtype="text" phptype="string" null="false" />
<field key="infoFaciliteiten" dbtype="text" phptype="string" null="false" />
<field key="infoAccomodatie" dbtype="text" phptype="string" null="false" />
<field key="klasse" dbtype="decimal" precision="5,1" phptype="float" null="false" />
<field key="soort" dbtype="varchar" precision="100" phptype="string" null="false" />
<field key="type" dbtype="varchar" precision="250" phptype="string" null="false" />
<field key="details" dbtype="text" phptype="string" null="false" />
<field key="thumbnail" dbtype="varchar" precision="200" phptype="string" null="false" />
<field key="active" dbtype="int" precision="1" phptype="integer" null="false" />
<field key="lastminute" dbtype="int" precision="11" phptype="integer" null="false" />
<field key="aangemaakt" dbtype="int" precision="11" phptype="integer" null="false" />
<field key="gewijzigd" dbtype="int" precision="11" phptype="integer" null="false" />
<field key="reisSoorten" dbtype="text" phptype="string" null="false" />
<field key="accomodatieTypes" dbtype="text" phptype="string" null="false" />
<field key="offer_price" dbtype="decimal" precision="9,2" phptype="float" null="false" />
<field key="video" dbtype="varchar" precision="200" phptype="string" null="false" />
<field key="losse_prijs" dbtype="decimal" precision="9,2" phptype="float" null="false" />
<field key="meta_beschrijving" dbtype="text" phptype="string" null="true" />
<field key="meta_zoekwoorden" dbtype="varchar" precision="500" phptype="string" null="true" />
<field key="zoover" dbtype="int" precision="1" phptype="integer" null="true" />
<field key="dag_prijs" dbtype="decimal" precision="9,2" phptype="float" null="false" />
<field key="klm" dbtype="tinyint" precision="1" phptype="integer" null="false" />
<aggregate alias="Countries" class="Countries" local="land_id" foreign="id" cardinality="one" owner="foreign" />
</object>
<object class="Countries" table="countries" extends="xPDOSimpleObject">
<field key="id" dbtype="int" precision="11" phptype="integer" null="false" index="pk" generated="native"/>
<field key="naam" dbtype="varchar" precision="200" phptype="string" null="false" />
<field key="vluchtprijs" dbtype="varchar" precision="5" phptype="string" null="false" />
<field key="alias" dbtype="varchar" precision="200" phptype="string" null="false" />
<field key="image" dbtype="varchar" precision="200" phptype="string" null="false" />
<field key="showInMenu" dbtype="int" precision="11" phptype="integer" null="false" default="0" />
<field key="meta_keywords" dbtype="text" phptype="string" null="false" />
<field key="meta_description" dbtype="text" phptype="string" null="false" />
<field key="vluchtinformatie" dbtype="text" phptype="string" null="false" />
<field key="button1_value" dbtype="varchar" precision="255" phptype="string" null="false" />
<field key="button1_title" dbtype="varchar" precision="255" phptype="string" null="false" />
<field key="button1_content" dbtype="text" phptype="string" null="false" />
<field key="button2_value" dbtype="varchar" precision="255" phptype="string" null="false" />
<field key="button2_title" dbtype="varchar" precision="255" phptype="string" null="false" />
<field key="button2_content" dbtype="text" phptype="string" null="false" />
<field key="button3_value" dbtype="varchar" precision="255" phptype="string" null="false" />
<field key="button3_title" dbtype="varchar" precision="255" phptype="string" null="false" />
<field key="button3_content" dbtype="text" phptype="string" null="false" />
<field key="button4_value" dbtype="varchar" precision="255" phptype="string" null="false" />
<field key="button4_title" dbtype="varchar" precision="255" phptype="string" null="false" />
<field key="button4_content" dbtype="text" phptype="string" null="false" />
<field key="half_ticket" dbtype="decimal" precision="9,2" phptype="float" null="false" />
<field key="aangemaakt" dbtype="int" precision="11" phptype="integer" null="false" />
<field key="sort_order" dbtype="int" precision="11" phptype="integer" null="false" />
<field key="gewijzigd" dbtype="int" precision="11" phptype="integer" null="false" />
<composite alias="Accomodations" class="Accomodations" local="id" foreign="land_id" cardinality="many" owner="local" />
</object>
In wich i simply want the field 'naam' in "Countries" to be displayed in MIGX when i edit or make a new "Accomodations" value. The corresponding field in there is land_id. From what i've read in the docs, this schema should be right, however i'm still getting this error:
[2013-10-09 10:30:31] (ERROR @ /devabc/assets/components/migx/connector.php) No foreign key definition for parentClass: Accomodations using relation alias: Countries
And i have to admit, i just don't fully grasp what is going on when you define this relationship. Can someine point me in the reight direction?
Cheers