I tried the very latest nightly build this morning (25th) and its
working as intended. /cheer
I had previously tried the nightly build on the 23th (as recommended
by grigri) which still exhibited the problem. It must have been fixed
by those mysterious code fairies that work so tirelessly behind
Glad it's finally working!
It's odd, because trac says that this area of the model file hasn't
been changed since changeset 6360 (10th Jan 2008).
It must have been fixed by those mysterious code fairies
that work so tirelessly behind the scenes.
Maybe it really is a case of the Elves and the
Hi again folks, still not having any luck with this. Here's what I
currently have:
$tags = $this-Output-Tag-find(list, array(
fields=array(
{n}.Tag.id,
{n}.Tag.name,
{n}.TagType.name),
order=array(
TagType.name,
Tag.name ASC
),
recursive=0
));
I've tested this in the
Looks like the '{n}' bit is prepended automatically in the find()
method, so you don't need it.
Why it's not grouping is a different matter...
Exactly what SQL is generated without the '{n}' ? And paste a debug()
of the resultset too.
In fact, temporarily hack your model.php and add this line:
http://groups.google.com/group/cake-php/browse_thread/thread/996efa1f92415163/6c38e322189ec4ef?lnk=gstq=manish#6c38e322189ec4ef
On Jan 22, 4:20 pm, RichardAtHome [EMAIL PROTECTED] wrote:
Hi All
I've just upgraded a project to the latest beta 1.2 (cake_1.2.0.6311-
beta) and am struggling to
Try:
$tags = $this-Output-Tag-find
(
list,
array
(
order=array(TagType.name, Tag.name ASC)
)
);
The list method is now clever enough to insert a fields option that
includes your display key and primary key (usually something like name
and id respectively). If you want to generate a
Thanks for replying ian, but I'm still getting the same result:
Warning (512): SQL Error: 1109: Unknown table 'TagType' in order
clause [CORE\cake\libs\model\datasources\dbo_source.php, line 440]
And the SQL remains the same:
Query: SELECT `Tag`.`id`, `Tag`.`name` FROM `tags` AS `Tag` WHERE 1 =
Model::find('list', ...) automatically assumes you want $recursive -
-1 (no joins) unless you specify otherwise.
Try this:
$tags = $this-Output-Tag-find(list, array(
fields = array(
'{n}.Tag.id', // keyPath : Option value
'{n}.Tag.name', // valuePath: Option display field
Looks like it's fixed in the latest branch, but not in the beta:
https://trac.cakephp.org/changeset/6360/branches/1.2.x.x/cake/libs/model/model.php
On Jan 22, 2:20 pm, ianh [EMAIL PROTECTED] wrote:
Looking at the code thats what I thought it would do to (using the 1.2
beta) but my unit tests
Looking at the code thats what I thought it would do to (using the 1.2
beta) but my unit tests say that, when trying to generate a list of
events.url = events.name - this doesn't work:
return $this-find
(
'list'
, array
(
'conditions' = $conditions
10 matches
Mail list logo