日期:2014-05-19  浏览次数:20775 次

jpa注解
一个项目对应多个公司,用注解怎么写。谢谢。

------解决方案--------------------
@OneToMany(cascade = CascadeType.REMOVE, fetch = FetchType.LAZY)
@JoinTable(name = "t_ivr_callednumber", joinColumns = {@JoinColumn(name = "notification_id", referencedColumnName = "id")}, inverseJoinColumns = {@JoinColumn(name = "callednumber_id", referencedColumnName = "id")})