I have 2 external tables and combined them into a view.
I've added the view as package into modx so it is accessable using $modx->newQuery
To do this I used the CreateXpdoClasses snippet (i think from bobsguides)
Worked like a charm.
Than I had to add an extra column to one of the tables. Also added it into the view.
I re-ran the snippet. In the new mysql.schema.xml the new column (named oneliner) is automatically added:
<field key="oneliner" dbtype="varchar" precision="254" phptype="string" null="false" default="" />
However, when I do:
$oQrydeal = $modx->newQuery('Viewdeals');
$oQrydeal->where( array('courseId'=>$iCourseid, 'deal_published'=>'Yes') ) ;
$oQrydeal->limit(8) ;
$oDeals = $modx->getCollection('Viewdeals', $oQrydeal) ;
$aDeal = $oDeal->toArray() ;
var_dump(array_key_exists('oneliner',$aDeal)) ;
false is always returned. The new column oneliner is never there. (all the others are though)
Im sure im missing something small. maybe some cache issue but I haven't been able to figure it out. Anyone?
[ed. note: Towila last edited this post 12 years, 7 months ago.]