You can use CheckIdNameConflict on an attribute when you need MDriven Designer to let database evolution use an attribute name that may conflict with SQL Server naming rules; this is for designers and developers who have verified that the name must be used.
Purpose
During database evolution, including auto-evolve and database generation, MDriven checks attribute names for likely conflicts with SQL Server naming rules. This check helps prevent a generated database schema from using a name that the SQL server may reject or interpret differently.
Set CheckIdNameConflict to false only when you deliberately want evolution to use the attribute name despite that warning.
Default behavior
When CheckIdNameConflict is enabled, MDriven warns you if an attribute name is likely to conflict with SQL Server naming rules. Treat the warning as a schema-design issue to investigate before you generate or evolve the database.
For example, if an attribute is named Order and MDriven reports a possible naming conflict, keep the check enabled while you decide whether the model attribute should be renamed.
Disable the check only for a deliberate exception
Set CheckIdNameConflict to false when all of the following are true:
- You understand why MDriven reports the name as potentially conflicting.
- You require the existing attribute name to be used in the database.
- You have accepted the risk that the SQL server may not accept or may treat the generated name unexpectedly.
After you set the value to false, auto-evolve and database generation will use the potentially conflicting name.
Recommended workflow
- Run database generation or auto-evolve with the default check enabled.
- Review the warning and identify the attribute that causes it.
- Prefer renaming the attribute to a name that does not conflict with the SQL Server naming rules.
- If the name must remain, set CheckIdNameConflict to
falsefor that attribute. - Run evolution again and verify the resulting database schema in your target SQL Server environment.
Important considerations
| Choice | Result | Use when |
|---|---|---|
| Keep CheckIdNameConflict enabled | MDriven warns about likely SQL Server naming conflicts during evolution. | This is the normal and recommended choice. |
Set CheckIdNameConflict to false
|
MDriven uses the potentially conflicting name during auto-evolve or database generation. | The name is intentional and you have verified that it is appropriate for the target database. |
This setting suppresses MDriven's naming-conflict protection; it does not make a conflicting SQL name valid. Test the generated schema before relying on it in an environment where the database matters.
