NutzCN Logo
问答 SQLserver 创建数据库异常 It is being used for UNIQUE KEY constraint enforcement.
发布于 906天前 作者 Hamming 1303 次浏览 复制 上一个帖子 下一个帖子
标签:

实体类有 @Id @Name

'DROP INDEX sys_post.UQ__sys_post__7487D7964A58A0D6'
CaseMessage=An explicit DROP INDEX is not allowed on index 'sys_post.UQ__sys_post__7487D7964A58A0D6'. It is being used for UNIQUE KEY constraint enforcement.
@Table("sys_post")
public class SysPost extends BaseModel {
    private static final long serialVersionUID = 1L;

    /**
     * 岗位ID
     */
    @Id
    @ColDefine(type = ColType.INT, width = 10)
    @Column("post_id")
    @Comment("岗位ID")
    private Long postId;

    /**
     * 岗位编码
     */
    @Column("post_code")
    @Comment("岗位编码")
    @Excel(name = "岗位编码")
    private String postCode;

    /**
     * 岗位名称
     */
    @Name
    @Column("post_name")
    @Comment("岗位名称")
    @Excel(name = "岗位名称")
    private String postName;

MySQL 没问题 SQLserver 就异常了 求大佬赐教

1 回复

多对多 中间表 没有主键 也报错了

	... 91 common frames omitted
Caused by: org.nutz.dao.DaoException: !Nutz SQL Error: 'DROP INDEX sys_role_dept.null'
PreparedStatement: 
'DROP INDEX sys_role_dept.null'
CaseMessage=Incorrect syntax near the keyword 'null'.
添加回复
请先登陆
回到顶部