[TYPO3-mvc] unset relation
Peter Niederlag
typo3-list at niekom.de
Thu Feb 10 16:49:02 CET 2011
Hello Franz,
Am 10.02.2011 16:20, schrieb Franz Koch:
> Hey Peter,
[...]
> nice workaround, but there should of course still be builtin way to
> achieve this.
+1 ;)
> IIRC there where some changes in that area after 1.2.0,
> but I'm not entirely sure.
>
> What would be the suggested way/behavior in your eyes. Which value
> should trigger the deletion? I think '' and 0 shouldn't alter the
> relation, but maybe a -1 could indicate a deletion? Does anybody know
> how this is done in FLOW3?
If property is set/submitted then IMO options for deletion/unsetting
could be '0', '', '-1' or 'NULL'. My Favorites probably would be ''
and/or 'NULL'.
However Validation needs to be taken into account as well(does the model
allow an empty/NULL relation?)! Btw from kickstarted Model unsetting a
relation is not possible at all IMO(?).
So existance of method('unsetXxxxxx') could be a way to handle it(?).
Na, it is quite complex and tricky...
Greets,
Peter
--
Peter Niederlag
http://www.niekom.de * TYPO3 & EDV Dienstleistungen *
More information about the TYPO3-project-typo3v4mvc
mailing list