I would disagree a little :) Sorry Jeremy

There are User and Invoice.

The User has an attribute that states whether the User is a user or an
assessor.

The User has an association to itself as Assessor with condition that
the associated User is an assessor.

User hasOne User (Assessor, conditions => [role = assessor])

An invoice is associated to both the Assessor and the User, because
the User may switch to another Assessor before the Invoice is paid,
thus Assessor must also be associated!

Invoice belongsTo User
Invoice belongsTo User (Assessor)

In the Invoice will be an attribute that defines whether the invoice
has been paid or not. There is no need to make a specific table for
the invoice status.

Hope the above is clear, else you are welcome to ask questions :)
Enjoy,
   John


On Apr 15, 5:44 pm, Jeremy Burns <[email protected]> wrote:
> My guess...
>
> User $hasOne Assessor
> Assessor $hasMany User
> User $hasMany Invoice
> (Assessor gets to invoices via $this->Assessor->User->Invoice)
> Invoice $belongsTo Status
> Status $hasMany Invoice
>
> Jeremy Burns
> [email protected]
>
[snip]

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to