Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Update uses new values in the Where selection

#87

Luiz: i have a A_x_B_x_C model where A, B and C are PKs 2 points here: 1. Recess doent allows me declare "!Column PrimaryKey" to A_id, B_id, C_id at the same time Sent at 10:14 AM on Thursday Luiz: 2. If i try to update an instance of A_x_B_x_C the update query is wrong, because it uses the NEW values int the WHERE clause Look: $abc->a_id = 1; $abc->b_id = 2; $abc->c_id = 3; $abc->exists(); $abc->a_id = 5; $abc->save(); what i expected: UPDATE A_x_B_C SET a_id = 5 WHERE a_id = 1 AND b_id = 1 AND c_id = 2; what i got: UPDATE A_x_B_C SET a_id = 5 WHERE a_id = 5 AND b_id = 1 AND c_id = 2; i think we need store key values in a private var on model object named like: $originalValues; and use the $originalValues for WHERE clause do you agree?

Reported by Kris Jordan · April 9th, 2009 @ 11:01 AM

State: open
Milestone: 0.30
Assigned to: Kris Jordan Kris Jordan

Activity

  1. Kris Jordan
    Kris Jordan
    • State changed from new to open

    June 9th, 2009 @ 02:10 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.