使用PowerDesigner生成数据库脚本时报Entity Attribute name uniqueness错误:
2016-12-09 12:40
363 查看
使用PowerDesigner生成数据库脚本时报Entity
Attribute name uniqueness错误:
![](http://c-xuan.com/img/posts/ConstraintNameUniquenessProblem-1.png)
方法一:
双击每行错误,发现外键引用的名字有重复的:
![](http://c-xuan.com/img/posts/ConstraintNameUniquenessProblem-2.png)
惯性去网上找解决办法,找到的主要是两个方法:
1.使用Automatic Correction
右键错误行,菜单中选择Automatic Correction,自动更正错误。
![](http://c-xuan.com/img/posts/ConstraintNameUniquenessProblem-3.png)
这样Constraint name 就会自动编号处理。
![](http://c-xuan.com/img/posts/ConstraintNameUniquenessProblem-4.png)
2.手动修改Constraint name
在外键引用编辑页面,点击Constraint name最右面的那个头像,然后修改Constraint name名称就可以了。
![](http://c-xuan.com/img/posts/ConstraintNameUniquenessProblem-5.png)
虽然可以解决问题,但感觉治标不治本。仔细看自动生成的Constraint name,应该是有一个模版,根据名称模板自动生成的。只要找到这个名称模板,根据自己的规则修改下不就好了。所以给出第三种处理方法。
3.修改引用名称模板
菜单项 数据库(Database)->Edit Current DBMS…
找到Scipt->Objects->Reference->ConstName节点,看到Value值就是自动生成的引用名称模板,具体含义就不解释了,对比下实际生成的引用名称就明白了,我改成 FK%REFR% ,让自动生成的名称就是外键编辑窗口中自定义的Code名称加个FK前缀就行了。
![](http://c-xuan.com/img/posts/ConstraintNameUniquenessProblem-6.png)
方法二:
如果不想其检测重名信息,可以停止检查:
选择"Tools -> Model Options"后 "Allow reuse"复选框,建议把这个钩也去掉
Tool->check model...去掉Entity Attribute下Entity Attribute name uniqueness 和 Entity Attribute code uniqueness
原文地址 http://c-xuan.com/2016/09/12/ConstraintNameUniquenessProblem/
Attribute name uniqueness错误:
![](http://c-xuan.com/img/posts/ConstraintNameUniquenessProblem-1.png)
方法一:
双击每行错误,发现外键引用的名字有重复的:
![](http://c-xuan.com/img/posts/ConstraintNameUniquenessProblem-2.png)
惯性去网上找解决办法,找到的主要是两个方法:
1.使用Automatic Correction
右键错误行,菜单中选择Automatic Correction,自动更正错误。
![](http://c-xuan.com/img/posts/ConstraintNameUniquenessProblem-3.png)
这样Constraint name 就会自动编号处理。
![](http://c-xuan.com/img/posts/ConstraintNameUniquenessProblem-4.png)
2.手动修改Constraint name
在外键引用编辑页面,点击Constraint name最右面的那个头像,然后修改Constraint name名称就可以了。
![](http://c-xuan.com/img/posts/ConstraintNameUniquenessProblem-5.png)
虽然可以解决问题,但感觉治标不治本。仔细看自动生成的Constraint name,应该是有一个模版,根据名称模板自动生成的。只要找到这个名称模板,根据自己的规则修改下不就好了。所以给出第三种处理方法。
3.修改引用名称模板
菜单项 数据库(Database)->Edit Current DBMS…
找到Scipt->Objects->Reference->ConstName节点,看到Value值就是自动生成的引用名称模板,具体含义就不解释了,对比下实际生成的引用名称就明白了,我改成 FK%REFR% ,让自动生成的名称就是外键编辑窗口中自定义的Code名称加个FK前缀就行了。
![](http://c-xuan.com/img/posts/ConstraintNameUniquenessProblem-6.png)
方法二:
如果不想其检测重名信息,可以停止检查:
选择"Tools -> Model Options"后 "Allow reuse"复选框,建议把这个钩也去掉
Tool->check model...去掉Entity Attribute下Entity Attribute name uniqueness 和 Entity Attribute code uniqueness
原文地址 http://c-xuan.com/2016/09/12/ConstraintNameUniquenessProblem/
相关文章推荐
- PowerDesigner生成数据库表及建库语句使用帮助
- 使用PowerDesigner生成数据库测试数据
- 数据库中导出SQL,使用PowerDesigner 让SQL反向工程生成pdm数据库mode。
- 使用PowerDesigner连接数据库并生成ER图
- 使用PowerDesigner生成数据库测试数据
- 使用PowerDesigner生成数据库测试数据
- PowerDesigner使用教程-------powerDesigner生成excel版本的数据库文件--阿冬专栏
- 使用PowerDesigner的物理模型生成不同的数据库和转换成OOM模型生成CS实体类代码
- 使用PowerDesigner生成数据库
- 使用PowerDesigner 15对现有数据库进行生成图表结构
- 使用PowerDesigner生成数据库测试数据
- 使用PowerDesigner生成数据库建表SQL脚本时去双引号
- 使用 powerdesigner 将数据库表结构逆向工程生成对应的word文档
- 使用powerdesigner设计并生成数据库表
- 使用PowerDesigner逆向生成数据库E-R图
- 使用PowerDesigner连接数据库生成ER图操作步骤
- 使用PowerDesigner逆向生成数据库E-R图
- 使用PowerDesigner 15进行逆向工程生成数据库图表时,列的注释问题
- 使用PowerDesinger将mysql中的数据库逆向生成为PDM文件 转载 2017年02月04日 12:44:11 1574 Part 1 PowerDesigner连接mysql逆向生成pd
- 使用PowerDesigner连接数据库并生成ER图