Bug Report T305883
Visible to All Users

ModelDifferenceDbStore - The Copy Model Differences command with Copy Behavior = Merge can create two elements instead of one when it was removed on the previous layer and re-added on the next layer

created 9 years ago (modified 9 years ago)

Steps to reproduce:
Use our \EFDemoCodeFirst\CS\EFDemo.Win:

  1. In Model.XAFML at design time, remove the LastName column:
      <Views>
        <ListView Id="Contact_ListView">
          <Columns>
            <ColumnInfo Id="LastName" Removed="True" />
          </Columns>
        </ListView>
      </Views>

  2. Run the application and log in as Sam - no LastName in the Contact_ListView, as expected.

  3. Add the removed column back via the grid's column chooser:
      <Views>
        <ListView Id="Contact_ListView">
          <Columns>
            <ColumnInfo Id="LastName" PropertyName="LastName" Index="0" IsNewNode="True" />
          </Columns>
        </ListView>
      </Views>
    and then open/close Model Editor.

  4. Open Model Difference for Sam and clicked Copy Model Differences under the Tools menu.

  5. In the dialog, set Copy Behavior = Merge, Target Model Differences = Shared Model Differences and pressed OK. As a result, the Shared Model Differences  will look as follows, which is unexpected:
        <ListView Id="Contact_ListView">
          <Columns>
            <ColumnInfo Id="LastName" Removed="True" />
            <ColumnInfo Id="LastName" PropertyName="LastName" Index="0" IsNewNode="True" />
          </Columns>
        </ListView>

Expected results:
The XML at step 5 is wrong and instead it should be  <ColumnInfo Id="LastName" PropertyName="LastName" Index="0" IsNewNode="True" Removed="True"/>

Answers approved by DevExpress Support

created 9 years ago

We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.