alkemann/CakePHP-Assets — Issue #13: Multiple foreign keys with CakePHP Ordered behavior
Author: theraccoonbear
Created: 2011-12-06 17:40:23+00:00
State: open

I originally asked this on Stack Overflow, but it's gotten no responses.

http://stackoverflow.com/questions/8362015/cakephp-ordered-behavior-with-multiple-foreign-keys

My Item model has foreign keys section_id and category_id. An Item can be a child of either a Section _xor_ a Category. Whichever the Item is not a child of has a foreign_key value of 0. Is there any way the ordered behavior can accomodate this model and allow me to reorder Items under whichever parent the Items are attached?