Learning ColdBox: Multiple Updates uisng a Object
My venture in ColdBox has been so far very enjoyable. It has really changed the way I plan my applications. My stumble in to using objects (correctly) has also brought with it some challenges and changed my approach to building maintainable and reusable applications.
So far my blog entries on ColdBox have mainly been on objects, validation and persistent, all straight forward when doing simple updating/creating/deleting actions.
Anyway, going back to challenges and objects, my first real stumbling block came a few weeks ago. How do I insert multiple records from data that comes from a form using a object?
I asked this question on both the ColdBox forums and CFTALK list. They all make it sound so simple, not sure they had this in mind.
My problem was as follows: when creating/updating a product I need to insert/update or delete multiple records for the product options based on what the user ticked or not ticked. So my first attempt worked that's a start right? here goes....




