[TYPO3-mvc] update hidden / disabled records
Jonas Götze
jonnsn at gmail.com
Mon Apr 23 17:48:39 CEST 2012
Hi all,
If I remember right, I solved this in a project once by fetching my old
object with my own Query (using setRespectEnableFields(FALSE)) and
setting the new Values on it manually ($newObject->setProperty($property);
Now you usually would call
$this->myRepository->update($newObject);
But instead call
$this->myRepository->replace($oldObject,$newObject);
the Update-method actually simply fetches the existing object using
findByUid() and calls replace() too. So you're doing the same, but can
disrespect enableFields...
Hope that may help you still (or anyone else later).
Regards
Jonas
More information about the TYPO3-project-typo3v4mvc
mailing list