[TYPO3-mvc] Manually setting an UID
Sebastian Fischer
sf at marketing-factory.de
Fri Apr 1 10:55:33 CEST 2011
On 30.03.2011 22:14, Georg Grossberger wrote:
> 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
Hi Georg,
i know you would like to, but what benefit do you expect from setting
the remove id in the uid attribute?
I would surgest to add an attribute for the remove_id so the record
could be identified with the remote data and leave the uid as it was
intended internaly.
Greetings
Sebastian
More information about the TYPO3-project-typo3v4mvc
mailing list