2 Replies Latest reply on May 5, 2011 2:44 PM by brendalc1636

    Conflict when updating a record

    brendalc1636

      Hello. I'm having a problem I just don't understand. I am using the SQLAssembler to save to an Oracle database.

       

      My Flex GUI displays information about dependents in a datagrid. I populate the datagrid with an arraycollection that is populated by using a fill method. If I want to add a new dependent in the datagrid, I enter new information into a form and click a create button. My create button adds the dependent to the arraycollection. When I add this item to my arraycollection I also set it to a variable on my model called currentDependent:

       

      model.dependentCollection.addItem(newDependent);

      model.currentDependent = newDependent;

       

      If I immediately go to edit this dependent, I get a conflict. Upon investigation I found that when I add the new dependentt to the arraycollection, its primary key gets populated with a number of xxx. When I go and edit the object store in model.currentDependent, somehow it gets an primary key of xxy. These two primary keys should be the same. They should be the same object. The id-query in the create-item of the SQLAssembler simply calls a sequencer for the next number for the primary key.

       

      Any help would be greatly appreciated!

      Thank you!

      Brenda