#5239: Incorrect HABTM primaryKey when accessing HABTM model "automagically"
----------------------------------+-----------------------------------------
Reporter: NOSLOW | Owner:
Type: Bug | Status: closed
Priority: High | Milestone: 1.2.x.x
Component: Core Libs | Version: RC2
Severity: Major | Resolution: fixed
Keywords: HABTM, primaryKey | Php_version: n/a
Cake_version: |
----------------------------------+-----------------------------------------
Changes (by phpnut):
* status: reopened => closed
* resolution: => fixed
Comment:
nebbian,
The code TommyO gave you to use is the correct way to accomplish what you
want, if you reread the comment you will see that he noted your join model
is not being loaded, the only way this will be loaded is if you define the
'with' key in the code he gave you. Since your code and tables are
following your own conventions, the automagic workings of CakePHP do not
work like you expect them to work. Follow the conventions of the framework
and you will not have to go through the extra steps to make your code
work. Your assumption that the join model is not needed is totally wrong
in this case.
--
Ticket URL: <https://trac.cakephp.org/ticket/5239#comment:8>
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
-~----------~----~----~----~------~----~------~--~---