Just upgraded to 1.1
I got rid of the safe attributes as required, but otherwise made no other changes in my source. I thought safe attributes was pretty strange anyway and could be out of phase with
other things you specify.
Now I get this:
Error in querying SQL: SELECT comments.`id` AS `t1_c0`, comments.`userId`
AS `t1_c1`, comments.`jokeId` AS `t1_c2`, comments.`comment` AS `t1_c3`,
comments.`dateCreated` AS `t1_c4`, comments.`dateUpdated` AS `t1_c5`,
comments.`status` AS `t1_c6` FROM `Comment` comments WHERE
(comments.`jokeId`=:ypl0) ORDER BY ??.dateCreated. Bind with parameter
:ypl0='1'
It didn't do this before. What other information will I need to provide or adjustments to make to be able to fix this?
Page 1 of 1
Upgrading breaks query
#2
Posted 25 October 2009 - 07:11 PM
In 1.1, you no longer use ?? as table prefix. If you perform relational query, use the relation name as the prefix by default.
#3
Posted 25 October 2009 - 07:23 PM
I don't understand what you mean "use the relation name as the prefix by default." What is the relation name?
I think this is the rule causing problem
'comments' => array(self::HAS_MANY, 'Comment', 'jokeId',
'order'=>'??.dateCreated',
),
What *exactly* do I do to it to fix it?
I think this is the rule causing problem
'comments' => array(self::HAS_MANY, 'Comment', 'jokeId',
'order'=>'??.dateCreated',
),
What *exactly* do I do to it to fix it?
#5
Posted 25 October 2009 - 07:30 PM
Whoo hoo I stopped it borking. I changed everywhere '??.whatever' to 'whatever'
that was just a guess. You talk at way too high level for me!
that was just a guess. You talk at way too high level for me!
tixrus, on 25 October 2009 - 07:23 PM, said:
I don't understand what you mean "use the relation name as the prefix by default." What is the relation name?
I think this is the rule causing problem
'comments' => array(self::HAS_MANY, 'Comment', 'jokeId',
'order'=>'??.dateCreated',
),
What *exactly* do I do to it to fix it?
I think this is the rule causing problem
'comments' => array(self::HAS_MANY, 'Comment', 'jokeId',
'order'=>'??.dateCreated',
),
What *exactly* do I do to it to fix it?
#6
Posted 25 October 2009 - 07:32 PM
Real time forum posting anyway thanks. Works now, now I can go back to the other problem I posted today in the 1.0.? list.
Share this topic:
Page 1 of 1

Help












