php - How does multi-level ORM work in cakephp? -
i have following structure:
- order ---- (hasmany) ----> carton, shoe
- carton --- (belongsto) --> order
- carton --- (hasmany) ----> shoe
- shoe ----- (belongsto) --> order, carton
so order --> carton --> shoe
when saving data database order fine, carton fine, shoe gets "carton_id" set correctly, "the order_id" null. there way make work?
also when want list shoes belonging particular order (without using order_id) how can find shoes belong carton belongs specific order?
Comments
Post a Comment