<?xml version="1.0" encoding="UTF-8"?>
<model package="realestate" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" version="1.1">
<object class="Realty" table="realestate" extends="xPDOSimpleObject">
<field key="Ref_no" dbtype="varchar" precision="20" phptype="string" null="false" default=""/>
<field key="PropertyType" dbtype="varchar" precision="50" phptype="string" null="false" default=""/>
<field key="Price" dbtype="float" precision="15,2" phptype="string" null="false" default="0.00"/>
...
<field key="Bedrooms" dbtype="int" precision="10" phptype="integer" null="false" default="0"/>
<field key="Bathrooms" dbtype="int" precision="10" phptype="integer" null="false" default="0"/>
...
...
<field key="createdon" dbtype="datetime" phptype="datetime" null="true"/>
<field key="createdby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
<field key="editedon" dbtype="datetime" phptype="datetime" null="true"/>
<field key="editedby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
<field key="deleted" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
<field key="published" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
<aggregate alias="CreatedBy" class="modUser" local="createdby" foreign="id" cardinality="one" owner="foreign"/>
<aggregate alias="EditedBy" class="modUser" local="editedby" foreign="id" cardinality="one" owner="foreign"/>
<composite alias="prop_images" class="prop_images" local="Ref_no" foreign="Ref_no" cardinality="many" owner="local" />
</object>
<object class="prop_images" table="propimages" extends="xPDOSimpleObject">
<field key="Ref_no" dbtype="varchar" precision="20" phptype="string" null="false" default=""/>
<field key="imageurl" dbtype="varchar" precision="50" phptype="string" null="false" default=""/>
<field key="createdon" dbtype="datetime" phptype="datetime" null="true"/>
<field key="createdby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
<field key="editedon" dbtype="datetime" phptype="datetime" null="true"/>
<field key="editedby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
<field key="deleted" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
<field key="published" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
<aggregate alias="CreatedBy" class="modUser" local="createdby" foreign="id" cardinality="one" owner="foreign"/>
<aggregate alias="EditedBy" class="modUser" local="editedby" foreign="id" cardinality="one" owner="foreign"/>
<aggregate alias="Propertys" class="Realty" local="Ref_no" foreign="Ref_no" cardinality="one" owner="foreign" />
</object>
</model>

This question has been answered by Bruno17. See the first response.
could you also post your exported MIGX-configs, please!
<?xml version="1.0" encoding="UTF-8"?>
<model package="properties" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" version="1.1">
<object class="Property" table="properties" extends="xPDOSimpleObject">
<field key="Reference" dbtype="varchar" precision="20" phptype="string" null="false" default=""/>
....
<field key="createdon" dbtype="datetime" phptype="datetime" null="true"/>
<field key="createdby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
<field key="editedon" dbtype="datetime" phptype="datetime" null="true"/>
<field key="editedby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
<field key="deleted" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
<field key="published" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
<aggregate alias="CreatedBy" class="modUser" local="createdby" foreign="id" cardinality="one" owner="foreign"/>
<aggregate alias="EditedBy" class="modUser" local="editedby" foreign="id" cardinality="one" owner="foreign"/>
<composite alias="prop_images" class="prop_images" local="Reference" foreign="Reference" cardinality="many" owner="local" />
</object>
<object class="prop_images" table="propimages" extends="xPDOSimpleObject">
<field key="Reference" dbtype="varchar" precision="20" phptype="string" null="false" default=""/>
<field key="imageurl" dbtype="varchar" precision="50" phptype="string" null="false" default=""/>
<field key="createdon" dbtype="datetime" phptype="datetime" null="true"/>
<field key="createdby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
<field key="editedon" dbtype="datetime" phptype="datetime" null="true"/>
<field key="editedby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
<field key="deleted" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
<field key="published" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
<aggregate alias="CreatedBy" class="modUser" local="createdby" foreign="id" cardinality="one" owner="foreign"/>
<aggregate alias="EditedBy" class="modUser" local="editedby" foreign="id" cardinality="one" owner="foreign"/>
<aggregate alias="Propertys" class="Property" local="Reference" foreign="Reference" cardinality="one" owner="foreign" />
</object>
</model>
{
"formtabs":[
{
"MIGX_id":1,
"caption":"Property Specifications",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":1,
"field":"Reference",
"caption":"Reference",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":1
},
{
"MIGX_id":23,
"field":"Sold",
"caption":"Sold \/ Available \/ Under Offer \/ Off Market \/ Temporarily Off Market",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"listbox",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"Available==0||Sold==1||Temporarily Off Market==2||Off Market==3||Under Offer==4",
"default":"",
"useDefaultIfEmpty":"0",
"pos":2
},
{
"MIGX_id":12,
"field":"PropGallery",
"caption":"Property Images",
"description":"",
"description_is_code":"0",
"inputTV":"propgallery",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":3
},
{
"MIGX_id":2,
"field":"PropertyType",
"caption":"Property Type",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":4
},
{
"MIGX_id":3,
"field":"SubType",
"caption":"Sub Type",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":5
},
{
"MIGX_id":4,
"field":"Location",
"caption":"Location",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":6
},
{
"MIGX_id":5,
"field":"Category",
"caption":"Category",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"-- Choose Category --",
"pos":7
},
{
"MIGX_id":6,
"field":"Price",
"caption":"Price",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":8
},
{
"MIGX_id":11,
"field":"PricePM",
"caption":"Price Override",
"description":"The price placed here will be the main overriding price. !!CLEAR CACHE ONCE CHANGED!!",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":9
},
{
"MIGX_id":20,
"field":"Price_on_app",
"caption":"Price on application",
"description":"check to hide price - !!CLEAR CACHE ONCE CHANGED!!",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"checkbox",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"Hide price==1",
"default":"0",
"useDefaultIfEmpty":"0",
"pos":10
},
{
"MIGX_id":21,
"field":"Bedrooms",
"caption":"Beds",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":11
},
{
"MIGX_id":22,
"field":"Bathrooms",
"caption":"Baths",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":12
},
{
"MIGX_id":18,
"field":"BuiltArea",
"caption":"Built Area",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":13
},
{
"MIGX_id":17,
"field":"PlotArea",
"caption":"Plot Area",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":14
},
{
"MIGX_id":19,
"field":"TerraceArea",
"caption":"Terrace Area",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":15
},
{
"MIGX_id":7,
"field":"Description",
"caption":"Description",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"textarea",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":16
},
{
"MIGX_id":8,
"field":"Features",
"caption":"Features",
"description":"For Editing Only!! It is very important to follow this format:",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"textarea",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":17
},
{
"MIGX_id":9,
"field":"inBanner",
"caption":"Display Property in Carousel Banner",
"description":"please limit to about 5 in order to reduce page load.",
"description_is_code":"0",
"inputTV":"inbanner",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":18
},
{
"MIGX_id":10,
"field":"Online",
"caption":"Online",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":19
}
],
"pos":1
},
{
"MIGX_id":4,
"caption":"Images",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":24,
"field":"propimages_embed",
"caption":"Property Images",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"migxdb",
"validation":"",
"configs":"propimages_embed",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":1
}
],
"pos":2
}
],
"contextmenus":"update||unpublish||activate||recall_remove_delete",
"actionbuttons":"addItem||bulk||toggletrash",
"columnbuttons":"",
"filters":[
{
"MIGX_id":1,
"name":"search",
"label":"Search by Ref of Category.",
"emptytext":"",
"type":"textbox",
"getlistwhere":{
"Reference:LIKE":"%[[+search]]%",
"OR:Category:LIKE":"%[[+search]]%"
},
"getcomboprocessor":"",
"combotextfield":"",
"comboidfield":"",
"comboparent":"",
"default":""
},
{
"MIGX_id":2,
"name":"typefilter",
"label":"Type",
"emptytext":"- filter by type -",
"type":"combobox",
"getlistwhere":{
"PropertyType":"[[+typefilter]]"
},
"getcomboprocessor":"getcombo",
"combotextfield":"PropertyType",
"comboidfield":"",
"comboparent":"",
"default":""
},
{
"MIGX_id":3,
"name":"areafilter",
"label":"Area Filter",
"emptytext":"- filter by area -",
"type":"combobox",
"getlistwhere":{
"Location":"[[+areafilter]]"
},
"getcomboprocessor":"getcombo",
"combotextfield":"Location",
"comboidfield":"",
"comboparent":"",
"default":""
},
{
"MIGX_id":7,
"name":"publishedfilter",
"label":"Published Filter",
"emptytext":"- published items -",
"type":"combobox",
"getlistwhere":{
"published":"[[+publishedfilter]]"
},
"getcomboprocessor":"getcombo",
"combotextfield":"inbanner",
"comboidfield":"",
"comboparent":"",
"default":""
},
{
"MIGX_id":5,
"name":"highlightedfilter",
"label":"Highlighted Filter",
"emptytext":"- highlighted -",
"type":"combobox",
"getlistwhere":{
"highlighted":"[[+highlightedfilter]]"
},
"getcomboprocessor":"getcombo",
"combotextfield":"highlighted",
"comboidfield":"",
"comboparent":"",
"default":""
},
{
"MIGX_id":6,
"name":"inbannerfilter",
"label":"In Banner Filter",
"emptytext":"- banner items -",
"type":"combobox",
"getlistwhere":{
"inbanner":"[[+inbannerfilter]]"
},
"getcomboprocessor":"getcombo",
"combotextfield":"inbanner",
"comboidfield":"",
"comboparent":"",
"default":""
},
{
"MIGX_id":8,
"name":"categoryfilter",
"label":"Category",
"emptytext":"- filter by category -",
"type":"combobox",
"getlistwhere":{
"Category:LIKE":"%[[+categoryfilter]]%"
},
"getcomboprocessor":"tvgetcombo",
"combotextfield":"prop_cat",
"comboidfield":"",
"comboparent":"",
"default":""
}
],
"extended":{
"migx_add":"Add Property",
"disable_add_item":"",
"add_items_directly":"",
"formcaption":"Properties",
"update_win_title":"Properties",
"win_id":"properties",
"maxRecords":"",
"addNewItemAt":"top",
"multiple_formtabs":"",
"multiple_formtabs_label":"",
"multiple_formtabs_field":"",
"multiple_formtabs_optionstext":"",
"multiple_formtabs_optionsvalue":"",
"actionbuttonsperrow":4,
"winbuttonslist":"",
"extrahandlers":"gridfilter||this.addItem||this.handleColumnSwitch",
"filtersperrow":4,
"packageName":"properties",
"classname":"Property",
"task":"",
"getlistsort":"",
"getlistsortdir":"",
"sortconfig":"",
"gridpagesize":"",
"use_custom_prefix":"0",
"prefix":"",
"grid":"",
"gridload_mode":1,
"check_resid":1,
"check_resid_TV":"",
"join_alias":"",
"has_jointable":"no",
"getlistwhere":"",
"joins":"",
"hooksnippets":"",
"cmpmaincaption":"Properties",
"cmptabcaption":"Properties",
"cmptabdescription":"Please add your property here",
"cmptabcontroller":"",
"winbuttons":"",
"onsubmitsuccess":"",
"submitparams":""
},
"columns":[
{
"MIGX_id":1,
"header":"ID",
"dataIndex":"id",
"width":40,
"sortable":true,
"show_in_grid":1,
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
},
{
"MIGX_id":2,
"header":"Reference",
"dataIndex":"Reference",
"width":"",
"sortable":"false",
"show_in_grid":1,
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
},
{
"MIGX_id":5,
"header":"Location",
"dataIndex":"Location",
"width":"",
"sortable":true,
"show_in_grid":1,
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
},
{
"MIGX_id":4,
"header":"Type",
"dataIndex":"PropertyType",
"width":"",
"sortable":"false",
"show_in_grid":1,
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
},
{
"MIGX_id":14,
"header":"Sub Type",
"dataIndex":"SubType",
"width":"",
"sortable":"false",
"show_in_grid":1,
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
},
{
"MIGX_id":6,
"header":"Category",
"dataIndex":"Category",
"width":"",
"sortable":true,
"show_in_grid":1,
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
},
{
"MIGX_id":7,
"header":"Sold",
"dataIndex":"Sold",
"width":50,
"sortable":"false",
"show_in_grid":1,
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":9,
"header":"Price",
"dataIndex":"Price",
"width":"",
"sortable":"false",
"show_in_grid":1,
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
},
{
"MIGX_id":11,
"header":"Banner Item",
"dataIndex":"inbanner",
"width":"",
"sortable":"false",
"show_in_grid":1,
"renderer":"this.renderSwitchStatusOptions",
"clickaction":"switchOption",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":[
{
"MIGX_id":1,
"name":"include",
"value":1,
"clickaction":"",
"handler":"",
"image":"assets\/components\/migx\/style\/images\/tick.png"
},
{
"MIGX_id":2,
"name":"exclude",
"value":"0",
"clickaction":"",
"handler":"",
"image":"assets\/components\/migx\/style\/images\/cross.png"
}
]
},
{
"MIGX_id":12,
"header":"Published",
"dataIndex":"published",
"width":"",
"sortable":"false",
"show_in_grid":1,
"renderer":"this.renderSwitchStatusOptions",
"clickaction":"switchOption",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":[
{
"MIGX_id":1,
"name":"published",
"value":1,
"clickaction":"",
"handler":"",
"image":"assets\/components\/migx\/style\/images\/tick.png"
},
{
"MIGX_id":2,
"name":"unpublish",
"value":"0",
"clickaction":"",
"handler":"",
"image":"assets\/components\/migx\/style\/images\/cross.png"
}
]
},
{
"MIGX_id":13,
"header":"Highlighted",
"dataIndex":"highlighted",
"width":"",
"sortable":"false",
"show_in_grid":1,
"renderer":"this.renderSwitchStatusOptions",
"clickaction":"switchOption",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":[
{
"MIGX_id":1,
"name":"include",
"value":1,
"clickaction":"",
"handler":"",
"image":"assets\/components\/migx\/style\/images\/tick.png"
},
{
"MIGX_id":2,
"name":"exclude",
"value":"0",
"clickaction":"",
"handler":"",
"image":"assets\/components\/migx\/style\/images\/cross.png"
}
]
}
]
}{
"formtabs":[
{
"MIGX_id":6,
"caption":"Edit Image",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":27,
"field":"Reference",
"caption":"Reference",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":1
},
{
"MIGX_id":28,
"field":"imageurl",
"caption":"Image URL",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":2
}
],
"pos":1
}
],
"contextmenus":"update||unpublish||activate||recall_remove_delete",
"actionbuttons":"bulk||toggletrash",
"columnbuttons":"",
"filters":"",
"extended":{
"migx_add":"Add Images",
"disable_add_item":"",
"add_items_directly":"",
"formcaption":"Property Images",
"update_win_title":"Property Images",
"win_id":"propimages_embed",
"maxRecords":"",
"addNewItemAt":"bottom",
"multiple_formtabs":"",
"multiple_formtabs_label":"",
"multiple_formtabs_field":"",
"multiple_formtabs_optionstext":"",
"multiple_formtabs_optionsvalue":"",
"actionbuttonsperrow":4,
"winbuttonslist":"",
"extrahandlers":"",
"filtersperrow":4,
"packageName":"properties",
"classname":"prop_images",
"task":"",
"getlistsort":"",
"getlistsortdir":"",
"sortconfig":"",
"gridpagesize":"",
"use_custom_prefix":"0",
"prefix":"",
"grid":"",
"gridload_mode":2,
"check_resid":1,
"check_resid_TV":"",
"join_alias":"Propertys",
"has_jointable":"no",
"getlistwhere":"",
"joins":"",
"hooksnippets":"",
"cmpmaincaption":"",
"cmptabcaption":"",
"cmptabdescription":"",
"cmptabcontroller":"",
"winbuttons":"",
"onsubmitsuccess":"",
"submitparams":""
},
"columns":[
{
"MIGX_id":2,
"header":"Reference",
"dataIndex":"Reference",
"width":"",
"sortable":"false",
"show_in_grid":1,
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
},
{
"MIGX_id":1,
"header":"Image Url",
"dataIndex":"imageurl",
"width":"",
"sortable":"false",
"show_in_grid":1,
"renderer":"this.renderImage",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
},
{
"MIGX_id":3,
"header":"ID",
"dataIndex":"id",
"width":10,
"sortable":"false",
"show_in_grid":1,
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
}
]
}
<?php
$packageName = 'properties';
$packagepath = $this->modx->getOption('core_path') . 'components/' . $packageName . '/';
$modelpath = $packagepath . 'model/';
if (is_dir($modelpath))
{
$this->modx->addPackage($packageName, $modelpath);
}
$object_id = $this->modx->getOption('object_id', $_REQUEST, 0);
if (!empty($object_id) && $object = $this->modx->getObject('Property', $object_id))
{
$ref = $object->get('Reference');
$this->customconfigs['getlistwhere'] = '{"Reference":"' . $ref . '"}';
}
{"aftersave":"propertyimage_aftersave"}
$object = &$modx->getOption('object',$scriptProperties,null);
$co_id = (int) $modx->getOption('co_id',$_REQUEST,0);
if ($parent_object = $modx->getObject('Property',$co_id)){
$ref = $parent_object->get('Reference');
$object->set('Reference',$ref);
$object->save();
}
return '';
[[migxIsNewObject]]
so your using a one to many relational database scheme. one property to many images. correct me if im wrong but it looks like your using a many to many.
could you not store the images as a BLOB?
[2015-10-20 10:25:05] (ERROR @ /assets/components/migx/connector.php) Error 42S22 executing statement:
Array
(
[0] => 42S22
[1] => 1054
[2] => Unknown column 'prop_images.resource_id' in 'where clause'
)
{
"formtabs":[
{
"MIGX_id":135,
"caption":"Edit Image",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":529,
"field":"Reference",
"caption":"Reference",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":1
},
{
"MIGX_id":530,
"field":"imageurl",
"caption":"Image URL",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":2
}
],
"pos":1
}
],
"contextmenus":"update||publish||unpublish||remove",
"actionbuttons":"addItem",
"columnbuttons":"",
"filters":"",
"extended":{
"migx_add":"Add Images",
"disable_add_item":"",
"add_items_directly":"",
"formcaption":"Property Images",
"update_win_title":"Property Images",
"win_id":"propimages_embed",
"maxRecords":"",
"addNewItemAt":"bottom",
"multiple_formtabs":"",
"multiple_formtabs_label":"",
"multiple_formtabs_field":"",
"multiple_formtabs_optionstext":"",
"multiple_formtabs_optionsvalue":"",
"actionbuttonsperrow":4,
"winbuttonslist":"",
"extrahandlers":"",
"filtersperrow":4,
"packageName":"properties",
"classname":"prop_images",
"task":"",
"getlistsort":"",
"getlistsortdir":"",
"sortconfig":"",
"gridpagesize":"",
"use_custom_prefix":"0",
"prefix":"",
"grid":"",
"gridload_mode":2,
"check_resid":"0",
"check_resid_TV":"",
"join_alias":"",
"has_jointable":"no",
"getlistwhere":"",
"joins":"",
"hooksnippets":{
"aftersave":"propertyimage_aftersave"
},
"cmpmaincaption":"",
"cmptabcaption":"",
"cmptabdescription":"",
"cmptabcontroller":"",
"winbuttons":"",
"onsubmitsuccess":"",
"submitparams":""
},
"columns":[
{
"MIGX_id":2,
"header":"Reference",
"dataIndex":"Reference",
"width":"",
"sortable":"false",
"show_in_grid":1,
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
},
{
"MIGX_id":1,
"header":"Image Url",
"dataIndex":"imageurl",
"width":"",
"sortable":"false",
"show_in_grid":1,
"renderer":"this.renderImage",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
},
{
"MIGX_id":3,
"header":"ID",
"dataIndex":"id",
"width":10,
"sortable":"false",
"show_in_grid":1,
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
}
]
}