Call the find on the ParentsDomain model instead:
$this-Domain-ParentDomain-find('all', array('conditions' =
array(ParentDomain.chronicle_id=1)));
On Sunday, June 10, 2012 11:45:48 PM UTC-4, Michael wrote:
So I have a table called Domains which has a parent_id allowing the
domains to
It can be done in one command. I had a similar problem the other day and I
solved it by initializing the constructor in the Model I wanted this to
work on and created a VirtualField, and by specifying the $this-alias
CakePHP could then pick up the association and find the appropriate column.
So I have a table called Domains which has a parent_id allowing the domains
to contain a parent/child relationship, the parent being referred to as
ParentDomain.
For the case I am working on, the ParentDomain has a variable called
chronicle_id. The condition I want to make will get all domains
$this-ParentDomain-hasMany['ParentDomain']['conditions'] =
'ParentDomain.chronicle_id = 1';
On Jun 11, 8:45 am, Michael Gaiser mjgai...@gmail.com wrote:
So I have a table called Domains which has a parent_id allowing the domains
to contain a parent/child relationship, the parent being referred
That couldn't be set in the class variable but you could add it into
the array within the action.
public $paginate = array(
'Post' = array(
...
)
);
public function function index()
{
$this-paginate['Post']['contain'] = array(
...
Just wondering if this is possible or how to go about it
Site has Posts from various users
Now a User can bookmark posts they like and save them, now when they view
the posts/index page how can i set pagination to contain so that it does not
shows posts that the user has saved.
Dave