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
jeremybu...@me.com


On 15 Apr 2010, at 12:12, kee2ka4 wrote:

> Hey Guys,
> 
> I am creating a php app using the cakephp framework. I am a newbie
> with cakephp and understand the importance of having the correct model
> associations. I have done some searching on model association but am
> confused on how to apply the correct model relationships. Here is a
> brief summary on what my app will do: I have types of users: 1. Users
> and 2. Assessors.
> 
> 1. Users login to the system and can search for Assessors. Users can
> select an Assessor and can only select one Assessor. If they want to
> select another Assessor then they need to first remove their current
> Assessor. Once the user selects an Assessor, their selected Assessor
> can create an Invoice that can be view my Users. Users can have
> multiple Invoices from their selected Assessor.
> 
> 2. Assessor’s can login to the system and view list of users that have
> selected them. They can create Invoices for their users. So Assessor
> can create zero or many invoices for their users.
> 
> 3. Invoice has two status: 1. Open and 2. Close, so when the Assessor
> creates an invoice for a particular user, the invoice has a status
> “Open” and when the user has paid, the invoice status changes to
> “Close”
> 
> By applying normalization, I get four tables 1. Users 2. Assessors 3.
> Invoices and 4. Statuses. Could someone plz guide me on what would be
> the correct relationships between these tables.
> 
> Thanks,
> Ket
> 
> 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 cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com 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.

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to