Hi,
This is a bit of an odd case. I have a deep association and want to
paginate the "farthest" model ignoring its relation to the
intermediate model... As a straight find using containable might
explain the hierarchy:

$this->data = $this->Person->find('first',array(
    'conditions' => array(
        'Person.pk' => $id
    ),
    'contain' => array(
        'Study' => array(
            'Series' => array(
                'Instance' => array(
                    'File'
                )
            )
        )
    )
));
As anyone can clearly see, this is a "legacy" database that I can't
alter. (pk is a bit of a tip-off)

This is a series of hasMany (and returning belongsTo)
Person->Study->Series->Instance->File

I want to paginate the Instances returned no matter if they belongTo
one of 5 series to fill the "page".
I want to paginate Files that eventually belongTo Person $id, ignoring
the intermediate models.
(I hope that explains it)

I was wondering if there was some , to me, unknown trick to get this
kind of pagination or if I should just accept a custom query (or some
hack of my own)?



--~--~---------~--~----~------------~-------~--~----~
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