Open abbadon1334 opened 1 year ago
ContainsXxx should imply nested CRUD, there is some old multiline demo for it https://github.com/atk4/ui/blob/51fb72710525baf51e98e479b0f4d8581845afa8/demos/form-control/multiline-containsmany.php
related with https://github.com/atk4/data/pull/1004 change made to address https://github.com/atk4/data/issues/881
containsXxx should behave like ref traversal, except the data are not in a different table, but instead of stored within the original table field
same for hintable
1:1 json/field data replace may be supported, but all insert/save/delete hooks must be save, ie. data must be always reparted and determined if added, changed or removed
Example code https://gist.github.com/abbadon1334/313e166efb598b8a416d6241c62ddbbb
if ContainsOne or ContainsMany fields in persistence are not null and an exception is raised : Critical Error Atk4\Data\ValidationException: ContainsXxx does not support unmanaged data modification
in Crud ContainsOne/ContainsMany must be not visible and should be managed by the framework when a model with those types of fields is added to crud
to solve some issues i already create these Helpers, but I like to have a way in the framework to avoid these helpers, any ideas?