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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -