My recommendation would be to return the record ID as the response to the call to save the record. If the save failed, you could return -1 and use that as a check.
--- In [email protected], "steveb805" <mestev...@...> wrote: > > Hi, > I'm mostly a newbie and am writing a simple Flex app. So far, just a List > box, where I am renderering a Checkbox and a :abel field, for a simple To-Do > utility. > > I just added the "Add New task" functionality, and it's working fine, using > the addItem method to add the new object to the List after saving the record > to DB via ZendAmf. > > However it has occurred to me that I need to go back to the database > immediately after, to get the record Id via ZendAmf so that the Flex List's > new Item has the actual database id. > > Is it best practice you think to create a ValueObject class for just this > integer - the task_id key field - or should I simply just use the existing > Value Object for the entire object that represents an entire Task and > obviously, just use the task_id field to pass it from db to flex. > > Steve >

