<?xml version="1.0" encoding="UTF-8"?> <model package="add" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" version="1.1"> <object class="CoachDetails" table="_coach_details" extends="xPDOSimpleObject"> <field key="coach_id" dbtype="int" precision="11" phptype="integer" null="false" index="unique" /> <field key="coach_bio" dbtype="varchar" precision="1000" phptype="string" null="true" /> <field key="makeup_1" dbtype="varchar" precision="45" phptype="string" null="true" /> <field key="makeup_2" dbtype="varchar" precision="45" phptype="string" null="true" /> <field key="makeup_3" dbtype="varchar" precision="45" phptype="string" null="true" /> <index alias="coach_id_idx" name="coach_id_idx" primary="false" unique="true" type="BTREE" > <column key="coach_id" length="" collation="A" null="false" /> </index> <aggregate alias="Coach" class="modUser" local="coach_id" foreign="id" cardinality="one" owner="foreign" /> </object>
This question has been answered by gissirob. See the first response.
{ "formtabs":[ { "MIGX_id":68, "caption":"add", "print_before_tabs":"0", "fields":[ { "MIGX_id":322, "field":"coach_bio", "caption":"Bio", "description":"", "description_is_code":"0", "inputTV":"", "inputTVtype":"", "validation":"", "configs":"", "restrictive_condition":"", "display":"", "sourceFrom":"config", "sources":"", "inputOptionValues":"", "default":"", "pos":1 } ], "pos":1 } ], "contextmenus":"update||remove", "actionbuttons":"addItem", "columnbuttons":"", "filters":"", "extended":{ "migx_add":"", "disable_add_item":"", "formcaption":"", "update_win_title":"", "win_id":"add", "maxRecords":"", "addNewItemAt":"bottom", "multiple_formtabs":"", "actionbuttonsperrow":4, "winbuttonslist":"", "extrahandlers":"", "filtersperrow":4, "packageName":"add", "classname":"CoachDetails", "task":"", "getlistsort":"", "getlistsortdir":"", "sortconfig":"", "gridpagesize":"", "use_custom_prefix":1, "prefix":"add", "grid":"", "gridload_mode":1, "check_resid":1, "check_resid_TV":"", "join_alias":"", "has_jointable":"yes", "getlistwhere":"", "joins":"", "cmpmaincaption":"Coaches", "cmptabcaption":"Coaches", "cmptabdescription":"Manage Coaches here", "cmptabcontroller":"", "winbuttons":"", "onsubmitsuccess":"", "submitparams":"" }, "columns":[ { "MIGX_id":1, "header":"ID", "dataIndex":"id", "width":10, "sortable":"false", "show_in_grid":1, "renderer":"", "clickaction":"", "selectorconfig":"", "renderchunktpl":"", "renderoptions":"" }, { "MIGX_id":2, "header":"Bio", "dataIndex":"coach_bio", "width":50, "sortable":"false", "show_in_grid":1, "renderer":"", "clickaction":"", "selectorconfig":"", "renderchunktpl":"", "renderoptions":"" } ] }
<object class="CoachDetails" table="coach_details" extends="xPDOSimpleObject">
{ "formtabs":[ { "MIGX_id":1, "caption":"Coach details", "print_before_tabs":"0", "fields":[ { "MIGX_id":1, "field":"coach_bio", "caption":"Coach Bio", "description":"Biography of the coach", "description_is_code":"0", "inputTV":"", "inputTVtype":"", "validation":"", "configs":"", "restrictive_condition":"", "display":"", "sourceFrom":"config", "sources":"", "inputOptionValues":"", "default":"", "pos":1 }, { "MIGX_id":2, "field":"makeup_1", "caption":"Lesson makeup day (1)", "description":"The first day that can be used for making up lessons.", "description_is_code":"0", "inputTV":"", "inputTVtype":"listbox", "validation":"", "configs":"", "restrictive_condition":"", "display":"", "sourceFrom":"config", "sources":"", "inputOptionValues":"Monday==Monday||Tuesday==Tuesday||Wednesday==Wednesday||Thursday==Thursday||Friday==Friday||Saturday==Saturday||Sunday==Sunday", "default":"", "pos":2 }, { "MIGX_id":3, "field":"makeup_2", "caption":"Lesson makeup day (2)", "description":"The second day that can be used for making up lessons.", "description_is_code":"0", "inputTV":"", "inputTVtype":"listbox", "validation":"", "configs":"", "restrictive_condition":"", "display":"", "sourceFrom":"config", "sources":"", "inputOptionValues":"Monday==Monday||Tuesday==Tuesday||Wednesday==Wednesday||Thursday==Thursday||Friday==Friday||Saturday==Saturday||Sunday==Sunday", "default":"", "pos":3 }, { "MIGX_id":4, "field":"makeup_3", "caption":"Lesson makeup day (3)", "description":"The third day that can be used for making up lessons.", "description_is_code":"0", "inputTV":"", "inputTVtype":"listbox", "validation":"", "configs":"", "restrictive_condition":"", "display":"", "sourceFrom":"config", "sources":"", "inputOptionValues":"Monday==Monday||Tuesday==Tuesday||Wednesday==Wednesday||Thursday==Thursday||Friday==Friday||Saturday==Saturday||Sunday==Sunday", "default":"", "pos":4 } ], "pos":1 } ], "contextmenus":"update||remove", "actionbuttons":"addItem", "columnbuttons":"", "filters":"", "extended":{ "migx_add":"Add coach details", "disable_add_item":"", "formcaption":"Add coach details", "update_win_title":"Add coach details", "win_id":"hca.coach.details", "maxRecords":"", "addNewItemAt":"bottom", "multiple_formtabs":"", "actionbuttonsperrow":4, "winbuttonslist":"done", "extrahandlers":"", "filtersperrow":4, "packageName":"add", "classname":"CoachDetails", "task":"", "getlistsort":"", "getlistsortdir":"", "sortconfig":"", "gridpagesize":"", "use_custom_prefix":1, "prefix":"add", "grid":"", "gridload_mode":1, "check_resid":1, "check_resid_TV":"", "join_alias":"", "has_jointable":"yes", "getlistwhere":"", "joins":"", "cmpmaincaption":"Coach Details", "cmptabcaption":"Coach info", "cmptabdescription":"", "cmptabcontroller":"", "winbuttons":"", "onsubmitsuccess":"", "submitparams":"" }, "columns":[ { "MIGX_id":1, "header":"ID", "dataIndex":"id", "width":10, "sortable":"false", "show_in_grid":1, "renderer":"", "clickaction":"", "selectorconfig":"", "renderchunktpl":"", "renderoptions":"" }, { "MIGX_id":2, "header":"Coach Bio", "dataIndex":"coach_bio", "width":50, "sortable":"false", "show_in_grid":1, "renderer":"", "clickaction":"", "selectorconfig":"", "renderchunktpl":"", "renderoptions":"" }, { "MIGX_id":3, "header":"Makeup day 1", "dataIndex":"makeup_1", "width":12, "sortable":"false", "show_in_grid":1, "renderer":"", "clickaction":"", "selectorconfig":"", "renderchunktpl":"", "renderoptions":"" }, { "MIGX_id":4, "header":"Makeup day 2", "dataIndex":"makeup_2", "width":12, "sortable":"false", "show_in_grid":1, "renderer":"", "clickaction":"", "selectorconfig":"", "renderchunktpl":"", "renderoptions":"" }, { "MIGX_id":5, "header":"Makeup day 3", "dataIndex":"makeup_3", "width":12, "sortable":"false", "show_in_grid":1, "renderer":"", "clickaction":"", "selectorconfig":"", "renderchunktpl":"", "renderoptions":"" } ] }
btw:I'm not sure what you mean here. Are you suggesting that table="_coach_details" should be table="add_coach_details"? I was simply going with the schema that was generated by migx from my tables.
I think it doesn't matter, but it would look better with a prefix of 'add_' in your xpdo-schema:
<object class="CoachDetails" table="coach_details" extends="xPDOSimpleObject">
J had the same "undefined" problem...
My solution was to use the exactly same name for
- MIGX -> Settings -> Name
- MIGX -> Settings -> unique MIGX ID
- MIGX -> MIGXdb -> Classname
when the "MIGX -> Settings -> Name" and the "MIGX -> Settings -> unique MIGX ID" is different, the undefined error appears for me ...