I think I’m getting somewhere. I tried changing the table being queried and all of a sudden it all jumped into life. I guess this points to an error in the schema / class map, so I am attaching them for your perusal as I must confess its all greek to me. When I understand how it works I would be happy to write a noddys guide; the fields I understand, but the afregates and composits
$xpdo_meta_map['modTemplateVar']= array (
'table' => 'site_tmplvars',
'fields' =>
array (
'type' => '',
'name' => '',
'caption' => '',
'description' => '',
'editor_type' => '0',
'category' => '0',
'locked' => '0',
'elements' => '',
'rank' => '0',
'display' => '',
'display_params' => '',
'default_text' => '',
),
'fieldMeta' =>
array (
'type' =>
array (
'dbtype' => 'varchar',
'precision' => '20',
'phptype' => 'string',
'null' => 'false',
),
'name' =>
array (
'dbtype' => 'varchar',
'precision' => '50',
'phptype' => 'string',
'null' => 'false',
),
'caption' =>
array (
'dbtype' => 'varchar',
'precision' => '80',
'phptype' => 'string',
'null' => 'false',
),
'description' =>
array (
'dbtype' => 'varchar',
'precision' => '255',
'phptype' => 'string',
'null' => 'false',
),
'editor_type' =>
array (
'dbtype' => 'int',
'precision' => '11',
'phptype' => 'integer',
'null' => 'false',
),
'category' =>
array (
'dbtype' => 'int',
'precision' => '11',
'phptype' => 'integer',
'null' => 'false',
),
'locked' =>
array (
'dbtype' => 'tinyint',
'precision' => '4',
'phptype' => 'integer',
'null' => 'false',
),
'elements' =>
array (
'dbtype' => 'text',
'phptype' => 'string',
'null' => 'false',
),
'rank' =>
array (
'dbtype' => 'int',
'precision' => '11',
'phptype' => 'integer',
'null' => 'false',
'index' => 'index',
),
'display' =>
array (
'dbtype' => 'varchar',
'precision' => '20',
'phptype' => 'string',
'null' => 'false',
),
'display_params' =>
array (
'dbtype' => 'text',
'phptype' => 'string',
'null' => 'false',
),
'default_text' =>
array (
'dbtype' => 'text',
'phptype' => 'string',
'null' => 'false',
),
),
'aggregates' =>
array (
'modCategory' =>
array (
'id' =>
array (
'local' => 'category',
'foreign' => 'id',
'cardinality' => 'one',
),
),
),
'composites' =>
array (
'modTemplateVarTemplate' =>
array (
'id' =>
array (
'local' => 'tmplvarid',
'foreign' => 'id',
'cardinality' => 'many',
),
),
'modTemplateVarDocument' =>
array (
'id' =>
array (
'local' => 'tmplvarid',
'foreign' => 'id',
'cardinality' => 'one',
),
),
'modTemplateVarDocumentGroup' =>
array (
'id' =>
array (
'local' => 'tmplvarid',
'foreign' => 'id',
'cardinality' => 'many',
),
),
),
);
$xpdo_meta_map['modtemplatevar']= & $xpdo_meta_map['modTemplateVar'];
Thank you for taking the time to help - I really do appreciate your efforts and xPDO is just wonderful !