首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

hibernate 中一对多的单向关联 注解的有关问题

2012-08-30 
hibernate 中一对多的单向关联 注解的问题一端:@OneToManyprivate SetTbBusinessplanaccount tbBusiness

hibernate 中一对多的单向关联 注解的问题
一端:
@OneToMany
private Set<TbBusinessplanaccount> tbBusinessplanaccounts = new HashSet<TbBusinessplanaccount>(0);

多端:
@ManyToOne  
@JoinColumn(name="PRODUCEPLANBOOK_ID")  
public TbProduceplanbook getTbProduceplanbook() {
return tbProduceplanbook;
}
异常:
  Caused by: org.hibernate.HibernateException: Missing table: Tb_ProducePlanBook_Tb_BusinessplanAccount

我是想让多方为主控端,所以不能设@OneToMany(mappedBy=...).
而且也不要采用关联表.这异常是要我增加关联表.
  谢谢.

热点排行