Ticket #438 (closed defect: fixed)
changed from Relationship of tables with multiple primary keys not populated properly (with test case)
| Reported by: | tamcy | Owned by: | zYne- |
|---|---|---|---|
| Priority: | major | Milestone: | 2.0.0 (OLD) |
| Component: | Query/Hydration | Version: | |
| Severity: | Keywords: | ||
| Cc: | Has Test: | no | |
| Status: | Pending Core Response | Has Patch: | no |
Description (last modified by solar) (diff)
The test case shows a Student table, a Course table and a StudentCourse table. A student may take multiple courses.
The primary key order in StudentCourse is (student_id, course_id).
When I select records from StudentCourse, the course object primary key is mistakenly overwritten by the student primary key, i.e. $course->id now equals to $studentCourse->student_id, which should to be $studentCourse->course_id (but the _id['c_id'] instance of the course is correct. Only the data['c_id'] is wrong.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.