#5710: HABTM - constraining unique ids, but removing non-unique
----------------------------+-----------------------------------------------
Reporter: Kumazatheef | Owner:
Type: Bug | Status: reopened
Priority: Medium | Milestone: 1.2.x.x
Component: General | Version: RC3
Severity: Normal | Resolution:
Keywords: | Php_version: PHP 5
Cake_version: |
----------------------------+-----------------------------------------------
Changes (by jaime):
* status: closed => reopened
* resolution: needmoreinfo =>
Comment:
Same issue on version 8166 (2009-05-04). I attached a tgz with a simple
example:
A student HABTM subjects. The join table consists on four fields: {id,
student_id, subject_id, semester}. If an students has the same subject on
two different semesters, model::find() will only returns one.
The correct result can be shown by changing dbo_source line 856 from:
{{{
(!in_array($data[$with][$joinKeys[1]], $uniqueIds))
}}}
into:
{{{
(true || !in_array($data[$with][$joinKeys[1]], $uniqueIds))
}}}
(Just as a quick demonstration, not a patch)
--
Ticket URL: <https://trac.cakephp.org/ticket/5710#comment:3>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC.
Our primary goal is to provide a structured framework that enables PHP users at
all levels to rapidly develop robust web applications, without any loss to
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---