Would it be possible to assign a status value of "Not applicable" (0)
to the B notifications, thus you would be able to use a condition like
Policy.status => array(0,1) AND Notification.user_id => $me

or something similar :)
Enjoy,
   John

On 15 Feb., 22:27, "Krissy Masters" <[email protected]>
wrote:
> This WILL sound complicated.
>
> Policy hasMany Notification / Notification belongsTo Policy
>
> Now the Notification can be
>
> A.       internal (relating to specific content in the site, so the data is
> gathered directly , created by logged in user, what page Policy it pertains,
> other policy info, notification reason..)
>
> B.       external (then the user fills out a form) and this is represented
> by Notification.local table field bool
>
> So now paginate Notifications easy enough until the JOINS condition
> Notification.user_id => $me, Policy.status => 1.
>
> Since external Notifications have no Policy.status those are not being
> pulled obviously. This is where the problem is. I have to keep the
> Policy.status for archive / record keeping legal mumbo jumbo so I simply can
> not delete a Notification, has to be marked read, fixed, outstanding,
> overdue.
>
> And all Nofifications must be in 1 page (pagination). I tried making an
> ExternalNotification model / controller but then I run into the issues of
> paginating 2 separate models as 1.
>
> If there is a way to find by(  Notification.user_id => $me, Policy.status =>
> 1) or (Notification.user_id => $me, Policy.status => does not exist?)
>
> Some other method suggestion, point me in a general direction.
>
> Thanks guys,
>
> K

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to