This does not look like a typical association, I don't think this kind of relationship can be managed with a simple association.
I think you will need to use an appropriate function within the Item Model with the business logic that manages the swap. On Jun 28, 5:35 am, Alteczen <[EMAIL PROTECTED]> wrote: > I have a table in my db called items and another called swapitems. > The swapitems tells me what items can be "swapped" for another item > and if there is a fee for the swap (one item is worth more than the > other). For example: > > items: > pk|name > 1|cat > 2|dog > 3|horse > > swapitems: > pk|org_id|swap_id|upcharge > 1|1|2|5 - you can swap a cat for a dog if you give the cat plus $5 > 2|1|3|20 - you can swap a cat for a horse if you give the cat plus > $20 > > What association would I use when "baking" my models for the sideswap > model? Or should I set this up some other way? > > Thanks for the help !!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
