我的数据库中有3个表:User,UserRole和UserRoleMapping。 UserRoleMapping包含用户与其角色之间的关联。
在我的Java Wicket应用程序中,我想使用hibernate逆向工程来生成类和xml映射(我使用netbeans)。在这样做时,我希望逆向工程在每个基类中创建一个集合,如下所示:
User {
...
Set <UserRole> userroles = new HashSet(0);
}
和
UserRole {
...
Set <User> users = new HashSet(0);
}
我需要在hibernate.reveng.xml类中做些什么才能做到这一点?
注意:我没有使用任何向导生成一个崇高的文件而且我没有使用eclipse。
干杯
答案 0 :(得分:0)
UserRoleMapping必须