[FLOW3-general] Repository getting "Last Inserted Id" (Last inserted object with persistence ID)

Davide CD dmichelangeli at hotmail.com
Thu Apr 19 10:33:30 CEST 2012


Thank you very much for your reply, Sebastian.
The problem can be so described:
An ExtJS Store (the proxy is a REST Proxy) sends a JSON string (a "hotel object") to a FLOW3 REST Controller. A POST method is used and the body contains the JSON string from the ExtJS Store. The hotel has no Id at this moment. The JSON String is converted in a object (a Hotel) with no identity with a Propertymapper.
Now, what I would like to to is to send back to the ExtJS Store the hotel with the ID (__identity) set by FLOW3 as soon as this hotel is added to the repository.
$repository->add($hotel);
//At this point has the hotel the ID?
Thanks,Davide

> From: sebastian at typo3.org
> Date: Thu, 19 Apr 2012 08:25:14 +0200
> To: flow3-general at lists.typo3.org
> Subject: Re: [FLOW3-general] Repository getting "Last Inserted Id" (Last inserted object with persistence ID)
> 
> Hey Davide,
> 
> usually you do not need this, as the framework handles all that
> transparently.
> Furthermore we use UUIDs instead of UIDs by default.
> 
> What do you want to do?
> 
> Greets, Sebastian
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
 		 	   		  


More information about the FLOW3-general mailing list