[TYPO3-mvc] Changing adding/removing an object to an ObjectStorage removes all hidden records

Steffen Ritter info at rs-websystems.de
Fri Aug 13 13:09:39 CEST 2010


Am 13.08.2010 13:04, schrieb Martin Kutschker:
> Am 13.08.2010 12:55, schrieb Steffen Ritter:
>> Am 13.08.2010 12:46, schrieb Martin Kutschker:
>>>> b, not correct
>>>    From you description it seems that it should ignore any "visibility" flags when reinserting the
>>> relations.
>>>
>> The problem is, that it uses the "object storage" to determine wether there is a relation or not.
>> And the ObjectStorage - for sure - includes only visible objects.
>
> Oh. But while this makes perhaps (!) sense in the FE it's wrong (as you have noticed) in the BE.
>
> IMHO the object storage must include all related objects but the deleted ones. For convenience sake
> there may be methods or additional (virtual) properties that omit any invisible objects. But what is
> visible or not may vary depending on the context. In the FE access control and time constraints must
> be taken into account, but in the BE only in rare conditions is even the "hidden" flag checked.
>
> Masi

Completly with you. But as long as the ObjectStorage does only contains 
Objects with EnableFields==TRUE you cannot rely on this in the 
storageBackend and "delete all relations and rebuild them afterwards 
with info from objectstorage".

The ObjectStorage currently is only a "view" on the data, hiding the 
hidden records, but the storagebackend should work on real data, not on 
a view.

CHanging the ObjectStorage might be quite complex, there fore I am just 
adapting the "persistObjectStorage" method.

regards

Steffen


More information about the TYPO3-project-typo3v4mvc mailing list