#5937: Enhance SaveAll() to handle more complex arrays (with deeper recursion)
-------------------------------------+--------------------------------------
Reporter: keymaster | Type: Enhancement
Status: new | Priority: Medium
Milestone: 1.3.x.x | Component: Model
Version: 1.2 Final | Severity: Normal
Keywords: saveaAll, Model, ORM | Php_version: n/a
Cake_version: |
-------------------------------------+--------------------------------------
This would be extremely useful in developing more generic, reusable
models.
One use case (just an example) might be a generic Cart model, with an
add($product) function.
One such complex product might be hotel reservation, (Hotel hasMany Rooms,
Rooms hasMany Rates).
When a reservation is made, and added to the cart, the reservation would
consist of the Hotel, the various rooms booked, and the daily rates of
each room, for each day of the reservation.
So, the Cart model's add($reservation) function would take the reservation
in an appropriately structured array, and use saveAll() to write it in one
fell swoop into the cart. Currently one would need to use nested looping.
Of course, there are many similiar applications to different areas.
This would take us one step closer to a more complete ORM implementation.
--
Ticket URL: <https://trac.cakephp.org/ticket/5937>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC.
Our primary goal is to provide a structured framework that enables PHP users at
all levels to rapidly develop robust web applications, without any loss to
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---