No containable behavior. In investigating it further I'm tracing the
first problem (line 193) to a lack of a result for

$this->params($model) on line 192 of CORE/cake/libs/view/helpers/
paginator.php

I debug'd $this->params and got this:

Array
(
    [controller] => users
    [action] => index
    [named] => Array
        (
            [page] => 1
            [sort] => name
            [direction] => asc
        )

    [pass] => Array
        (
        )

    [plugin] =>
    [form] => Array
        (
        )

    [url] => Array
        (
            [url] => users/index/page:1/sort:name/direction:asc
        )

    [paging] => Array
        (
            [User] => Array
                (
                    [page] => 1
                    [current] => 20
                    [count] => 70
                    [prevPage] =>
                    [nextPage] => 1
                    [pageCount] => 4
                    [defaults] => Array
                        (
                            [limit] => 20
                            [step] => 1
                            [order] => Array
                                (
                                    [name_last] => asc
                                )

                            [conditions] => Array
                                (
                                )

                        )

                    [options] => Array
                        (
                            [page] => 1
                            [limit] => 20
                            [order] => Array
                                (
                                    [name] => asc
                                )

                            [conditions] => Array
                                (
                                )

                        )

                )

        )

    [models] => Array
        (
            [0] => User
            [1] => Department
            [2] => MediaTour
            [3] => Project
            [4] => Client
            [5] => Tweet
        )

)



I tried adding a contains to my paginate variable in the User
controller, but no dice. $this-params looks identical.

I debug'd $this->paginate and got this (with or without the contains
key based on whether I was including that line or not.)


Array
(
    [order] => Array
        (
            [name_last] => asc
        )

    [contains] => Array
        (
            [0] => Department
        )

)

Any thoughts on where to look next? I'm sure I can hack around it but
I'd rather really figure out if I'm doing something wrong.

Last bits of possible relevant information:

User model:

116   var $belongsTo = array(
117     'Department' => array(
118       'className' => 'Department',
119       'foreignKey' => 'department_id',
120       'conditions' => '',
121       'fields' => '',
122       'order' => ''
123     )
124   );


Department model:

 18   var $hasAndBelongsToMany = array(
 19     'User' => array(
 20       'className' => 'User',
 21       'joinTable' => 'departments_users',
 22       'foreignKey' => 'department_id',
 23       'associationForeignKey' => 'user_id',
 24       'unique' => true,
 25       'conditions' => '',
 26       'fields' => '',
 27       'order' => '',
 28       'limit' => '',
 29       'offset' => '',
 30       'finderQuery' => '',
 31       'deleteQuery' => '',
 32       'insertQuery' => ''
 33     )
 34   );

(User's have a single Department associated with them, but
Department's can have (in addition) multiple User's associated with
them as department heads)

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"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/cake-php?hl=en

Reply via email to