hibernate多对多问题(急)
我在做一个系统管理的东西
需要添加角色和功能等信息
在添加角色时可以选择他所具有的功能所以需要使用多对多关系
现在的问题是
角色可以顺利添加进去,但是角色与功能的关系表中却没有计入任何信息
而角色持久化对象中的Set中也已经具有了功能对象
很郁闷
项目开发很急
请各位高手指点
以下是代码:
Role.hbm.xml
<hibernate-mapping>
<class name= "com.wtkj.ebiesf.persistent.dao.systemdao.Role " table= "T_YINGY_XT_JS " schema= "USZHXJC ">
<id name= "xh " type= "java.lang.Long ">
<column name= "XH " precision= "10 " scale= "0 " />
<generator class= "assigned " />
</id>
<property name= "jsdm " type= "java.lang.String ">
<column name= "JSDM " length= "20 " />
</property>
<property name= "jsmc " type= "java.lang.String ">
<column name= "JSMC " length= "100 " />
</property>
<property name= "jsms " type= "java.lang.String ">
<column name= "JSMS " length= "100 " />
</property>
<property name= "jsfl " type= "java.lang.String ">
<column name= "JSFL " length= "3 " />
</property>
<set name= "TYingyXtGndjses "
table= "T_YINGY_XT_GNDJS "
cascade= "save-update "
inverse= "true "
>
<key column= "XH_FKJS "> </key>
<many-to-many class= "com.wtkj.ebiesf.persistent.dao.systemdao.Function " column= "XH_FKGN "> </many-to-many>
</set>
</class>
</hibernate-mapping>