9

I'm having some issues with the DBML. Every time the team needs to synchronize changes into SVN, the DBML is changed which generates lots of conflicts. This seems to be related to some rearrangement in the dbml editor, because most of the associationConnector sections in the .dmbl.layout seem to change during development if you open the dbml file in the editor.

Do you have any best practices to avoid these layout rearrangements that can easily take more than one hour to fix?

Best regards, Gustavo

Gustavo
  • 359
  • 2
  • 5

2 Answers2

3

If you willing to use KDiff3, then you can configure a pre-processor command to sort the dbml file before merging. I've posted a guide on my blog at http://blog.trumpi.co.za/the-one-tip-that-i-wish-i-knew-years-ago-that-merges-easier/. The instructions are for git, but I know that TortoiseSVN can be configured in a similar way to route dbml merging to KDiff3.

Sir Rippov the Maple
  • 7,491
  • 5
  • 42
  • 52
3

If it is just the .layout being changed then I would actually ignore the request since the GUID's which link everything up will still match. They just won't be in the same place as I set them, something I could live with. If the .dbml changed as well, then I would accept both without merging.

Robert MacLean
  • 38,975
  • 25
  • 98
  • 152
  • We have all scenarios. I agree with what you said, but what if different people changed the same tables, requiring a merge, but at the same time having a lot of conflicts caused by the connectors rearrangement? – Gustavo Mar 10 '09 at 14:48
  • In the scenario you describe: If people do not change the tables, just moved them around the .dbml won't be effected and you could ignore that. If the .dbml changes then you would need to do a merge. – Robert MacLean Mar 10 '09 at 14:54
  • If I try a merge I will solve the new fields/tables problem but I will get duplicate associationConnector such as this one: – Gustavo Mar 10 '09 at 15:21
  • Yeah, let me rephrase. If the .layout changes always just accept (if the .dbml also changed) or reject it (if the .dbml didn't also change) - never merge. If the .dbml changes worry about merging that. – Robert MacLean Mar 11 '09 at 06:52
  • @RobertMacLean Can we ignore the .dbml file from sourcecontrol? Does it get generated when we build the visual studio database project? – jaxxbo Jan 18 '14 at 15:44