Let’s say I’m a restaurant, and I am setting up a form to create a new menu for the day. I have a
Menu which has many
MenuItems. My form should automatically populate with one menu item, “Fish of the Day”, whose
price field should default to the current market price (coming from the server).
I typically do this by hitting a
/menus/new.json endpoint. Questions:
- Is this recommended? What is the alternative when instantiation data needs to come from the server?
- How can this work? The
includedwill not have
idpopulated since these are unpersisted entities.