org.hibernate.cfg.JDBCBinderException: Duplicate class name CheckConstraints' generated for 'org.hibernate.mapping.Table(db.sys.check_constraints)'.
这是因为SQL Server中除了dbo下的表外还有许多系统表,在对系统表进行逆向工程时出错。
解决方案:
在hibernate.reveng.xml中设定只有dbo下的schema被用做逆向。
这是因为SQL Server中除了dbo下的表外还有许多系统表,在对系统表进行逆向工程时出错。
解决方案:
在hibernate.reveng.xml中设定只有dbo下的schema被用做逆向。
<hibernate-reverse-engineering>
<schema-selection match-schema="dbo"/>
</hibernate-reverse-engineering>
本文详细介绍了在使用Hibernate进行逆向工程时遇到SQLServer系统表导致的错误,通过在hibernate.reveng.xml中设定只使用dbo下的schema来解决问题的方法。
1168

被折叠的 条评论
为什么被折叠?



