[TYPO3-mvc] Manually setting an UID

Georg Grossberger georg at grossberger.at
Wed Mar 30 22:14:06 CEST 2011


Hello,

I'm currently working on a domain model, that is polulated with data 
from a REST API. Every data row comes with an ID, now I would like to 
use the Uid property to store that ID, because that Id is, when using 
TYPO3 terms, the UID of that record. How to do this?

Simply setting the UID field won't work because in that case the isNew 
method would return true on a new model.

One idea of mine was to overload the add method of the repository, to 
insert a blank record when a new object is created.

Any suggestions would be appriciated.

Greets,
Georg


More information about the TYPO3-project-typo3v4mvc mailing list