Committing Changes and Resolving Conflicts
[This content is no longer valid. For the latest information on "M", "Quadrant", SQL Server Modeling Services, and the Repository, see the Model Citizen blog.]
This topic describes how to resolve data conflicts and commit pending changes to a database by using Microsoft code name “Quadrant”.
Viewing Changes
As you edit data in “Quadrant”, “Quadrant” does not save those changes back to the database until you explicitly save your changes. You can view the pending change list for the database session associated with the active workpad, by click Changes on the View menu. Alternatively, double-click the Changes (n) area in the lower-right corner of the “Quadrant” status bar. The Changes (n) indicator is only visible in the status bar when there are pending changes.
The workpad that lists the changes is named after the session. The left pane lists all records that have pending changes for this session. Changes are listed in chronological order. To the left of each item, you can see an adorner that indicates the item’s status as follows.
- + (in black)
Item is newly added but not yet saved.
- - (in black)
Item is deleted.
- * (in black)
Item has been edited.
- ! (in red)
A conflict has occurred for this pending change.
- ? (in black)
Data has changed in the database after the session is opened.
These same adorners appear next to the affected items in their respective workpads.. In addition, when you move your mouse over the adorners in the original workpads, a tooltip pops up displaying the status of the change (for example, edit, delete, conflict, and so on).
Click an item on the left pane, and you can view all the changes associated with it on the right pane. The right pane is structured into three columns. The Proposed column shows the pending change (in this session), the Original column shows the value before the change, and the Database column shows the current value in the database. For a newly added record or folder, the database value for all of its fields is always N/A. This is also the case for an edited item that does not have a conflict, or if a conflict has not yet been detected.
Making Additional Changes Before Committing
As long as the pending change does not result in a conflict, you can make additional edits to the data in the change list. To do so, click the item that you want to edit in the left pane. In the right pane, click the specific field and edit.
Reverting Changes
On the File menu, click Revert All Changes. This will automatically discard all the pending changes of this session. Note that this operation affects all changes in this session. To revert an individual change for a particular item or field, use the change list workpad as described in the following sections. If the operation being reverted is an edit, the value is reset to the original value. After a change is reverted, the item is removed from the change list workpad.
Reverting Changes for an Item
To revert all changes for a single item, right-click the item in the left pane of the change list workpad and click Revert Changes. This will discard all pending changes for this item as shown in the right pane. The item will instead retain the original values.
Reverting Changes for a Field
To revert the change for a specific field, select the item in the left pane. Right-click the title of the field in the right pane and click Revert Field. This will discard the pending change for this single field and restore it to the original value.
Reverting an Add or Delete Operation
To revert an item that is added to or deleted from a collection, right-click the affected item in the left pane of the change list workpad and click Revert Add or Revert Delete, respectively. The add or delete operation will be discarded.
Resolving Conflicts
Conflicts can arise when edits are made in separate sessions within “Quadrant”, separate open instances of “Quadrant”, and directly from SQL Server Management Studio. These changes might result in discrepant data. This section describes how you can resolve the conflicts from those changes.
When “Quadrant” attempts to save changes and detects a discrepancy between the database field it has last observed and the current value in the database, the record is marked with an exclamation mark.
To resolve conflicts for all items in this session, on the File menu, click Resolve All Conflicts. A submenu opens, giving you an option to resolve the conflicts As Proposed (pending in change list), As Original (the original values), or As Database (values in the database). Note that this operation affects all changes in the session. To resolve conflicts for individual items or fields, use the change list as described in the following section.
For more information, see How to: Resolve Change Conflicts in "Quadrant".
Resolving Changes for an Item
To resolve changes for an item, right-click the item in the left pane of the change list workpad, and click Resolve All. A submenu opens giving you an option to resolve the conflicts As Proposed (pending in change list), As Original (the original values), or As Database (current values in the database).
All the fields that have a conflict will be resolved in the choice you picked previously. After all conflicts are resolved, press CTRL+S or click File and Save Changes.
Note that if you choose As Proposed, you can make further edits to the fields in the right pane before committing.
Resolving Changes for a Field
If the item contains multiple fields waiting to be resolved, you can overwrite your original decision in the left pane so that each field can be resolved in a different way. To do so, right-click the title of each field in the right pane and click Resolve Field, then click the options of the expanded submenu. When you are satisfied with the decision for each field, press CTRL+S or, on the File menu, click Save Changes.
Committing Changes
On the File menu, click Save Changes. Alternatively, press CTRL+S. This commits all pending changes of this session to the database.
See Also
Tasks
How to: Edit Data in "Quadrant"
How to: Edit Stale Data in "Quadrant"
How to: Resolve Change Conflicts in "Quadrant"