I have a project and I am trying to figure out the best way to associate my
models and how to structure them.   In particular, I have something like a
polymorphic association situation.

I want to have a table of transactions, that list the transfers of money
from one user to another.  The transactions refer to either an auction or a
fixed-price sale.

So I have a Sale model, an Auction model, and a Transaction model.  But the
transaction should associate to either an auction or a sale, but not both.
How can I do this?   How can avoid making two transaction models, one for
SaleTransactions, and one for AuctionTransactions?  Instead, just a
Transaction model that can refer to any other type of model that involves an
exchange of money.


-- 

Jacob Everist

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