so I may be missing the obvious.
The system is running version 1.3.8 using Microsoft SQL Server 2005 as
database. I appreciate that is slightly unusual, but having fixed the
URL rewrite I have seen no issues.
I'd like use a custom finderQuery, but I cannot even seem to replace
the default. Specifically if I use
var $hasMany = array(
'RecyclateTypeConversion' => array(
'className' => 'RecyclateTypeConversion',
'foreignKey' => 'recyclate_type_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => 'select RecyclateTypeConversion.* from
recyclate_type_conversions AS RecyclateTypeConversion WHERE
RecyclateTypeConversion.recyclate_type_id IN ({$__cakeID__$});',
'counterQuery' => ''
),
};
I see this error
Notice (8): Undefined index: RecyclateTypeConversion [CORE\cake\libs
\model\datasources\dbo_source.php, line 1099]
However the SQL debug output confirms that the query itself runs fine
and returns 4 records, and the view runs perfectly when the
finderQuery is not specified. I've tried for other hasMany tables too
- with exactly the same issue.
I've attempted to replace the select all with specific field selects
but I still see the same result. Certainly the query looks correct
according to the manual - so what is the issue (and could it be
related to using MSSQL?)
If I'm not doing something stupid and it is a bug what would be the
best approach to debugging this? I've started hunting through the cake
debugging class, but so far with no results that have enlightened me.
Of course if there is a problem I'll be submitting the fix back to the
project.
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment