You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need a proxy persistence. For one it will be really useful for Forms. Here is how I think it should work.
You create blank model and associate it with Proxy persistence.
You can add multiple models through a special method, and specify which fields you want to import.
Importing fields will copy all the properties
When you execute save() then $data[] is simply copied into relevant models then save() is executed on those models.
If multiple linked models exist within same persistence, we group them into atomic() operation.
There should be a way on how to link models. E.g. create "User" and "User_Contact", but the second should receive user_id value.
Proxy model can be saved into session easily if we want for multi-record operations.
Proxy can be used recursively (just a test no practical use).
Extra hooks.
Fields can be imported in a different order.
Support groups.
Support iterating. One model will be main, but other model will be intelligently pre-fetched and results connected.
Support grouping/aggregation. (not sure how yet)
Some support for switching nested model persistences (e.g. load from cache, but update back to API)
Support for order and limit
Proxy will be used extensively by Views (in Agile/UI). Adding field into Form will add it into proxy. Using setModel() will import bunch of fields into proxy. The same goes for Grid.
Proxies will quite often use a custom Field class. Proxy can also type-cast into formats that are designed for presenting, e.g. format date using locale, etc.
The text was updated successfully, but these errors were encountered:
We need a proxy persistence. For one it will be really useful for Forms. Here is how I think it should work.
Proxy will be used extensively by Views (in Agile/UI). Adding field into Form will add it into proxy. Using setModel() will import bunch of fields into proxy. The same goes for Grid.
Proxies will quite often use a custom Field class. Proxy can also type-cast into formats that are designed for presenting, e.g. format date using locale, etc.
The text was updated successfully, but these errors were encountered: