On Feb 9, 3:11 am, [email protected] wrote:
> Here is what I want it to be:
> Each member can apply for zero or more short term loan(s)
> A short term loan must have 1 or up to 3 comakers
> A comaker must also be a member.
> A member could be a comaker.
> It matters to know which member is the main 'loaner' and which member is  
> the comaker for each loan.
>
> Here is what the relationship looks like atm in my source:
>
> Member $hasOne = array('ShortTermLoanComaker');
> Member $hasMany = array('ShortTermLoan');
>
> ShortTermLoan $belongsTo = array('Member');
> ShortTermLoan $hasAndBelongsToMany = array('ShortTermLoanComaker');
>
> ShortTermLoanComaker $belongsTo = array('Member');
> ShortTermLoanComaker $hasAndBelongsToMany = array('ShortTermLoan');

That looks alright to me. To meet that last requirement, maybe you can
have a column in ShortTermLoan for the main "loaner" member ID and
force it to be non-null. Then of course all ShortTermLoanComakers
associated with that ShortTermLoan that do not have the ID contained
in that column, would be the comakers for the loan.
--~--~---------~--~----~------------~-------~--~----~
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