#6512: afterfind() not called when recursive=2 (using polymorphic behavior)
---+
Reporter: bmilesp | Type: Bug
Status: new | Priority: Medium
Milestone: 1.2.x.x | Component: General
Version: 1.2 Final | Severity: Normal
Keywords: | Php_version: PHP 5
Cake_version: 1.2.3.8166 |
---+
http://bakery.cakephp.org/articles/view/polymorphic-behavior
created: User hasMany=Notes that has polymorphic associations with
Product and Thingy Tables (i've used the exact code at:
http://bakery.cakephp.org/articles/view/polymorphic-behavior, then created
a users table with a hasmany association to Notes:
CREATE TABLE `users` (
`id` int(11) unsigned NOT NULL auto_increment,
`username` varchar(30) NOT NULL,
`password` varchar(30) NOT NULL,
`created` datetime default NULL,
`modified` datetime default NULL,
PRIMARY KEY (`id`)
);
When i call $this-Note-read(null,$note_id), i get the polymorphic
associated data as expected. When i call $this-User-read(null,$user_id),
even with $this-User-recursive = 2, i only get the Note data and none of
the polymorphic associative data.
I narrowed it down to the fact that the afterfind() method in the
polymorphic behavior does not get called when its recursion depth is =2.
--
Ticket URL: https://trac.cakephp.org/ticket/6512
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 tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/tickets-cakephp?hl=en
-~--~~~~--~~--~--~---