Command Table Pattern MySQL DiscardChanges error RRS feed

  • Question

  • Hello

    I am exploring creating a project in LS with a MySQL DataSource, evrything seems to be working fine but I tryed to create a Table Command Pattern and I am having a problem when discarding changes.

     partial void Comandos_Inserting(Comando entity)

    When I call the DiscardChanges the applications throws me thie exception:

    "An entity with the same identity already exists in this EntitySet"

    I checked the Table Mapping in the LSML file to see if something was not corectly mapped and it is good as far as I can see:

    <SsdlEntitySet Schema="lanceplayer"
                           Table="comandos" />
            <SsdlProperty Name="Id"
                          Type="int" />
    <EntityType Name="Comando">
          <EntityMethod Name="Delete">
              <Generated />
          <KeyProperty IsReadOnly="True"
              <Required />
              <NotSearchable />

    Is this a MySQL Connectr issue or something related to LS? Because if I comment the DiscardChanges line it submits correctly and insertes the Command register in the table with no problems.

    This is no a big problem, but I would like to know if I am doing somthing wrong if I need to use this feature in the future XD.

    Thanks :D


    • Edited by sebaxor Saturday, May 18, 2013 2:41 PM specific title
    Saturday, May 18, 2013 2:31 PM