2
我试图映射实体映射@OneToOne与@Where条款
@OneToOne(mappedBy = "localizedLabel")
@JoinColumn(insertable = false, updatable = false)
@WhereJoinTable(clause = "locale='en_US'")
public Localization getEn_US() {
return en_US;
}
我可以保证数据将只返回一个空或者如果没有找到,但休眠似乎忽略我@ Where子句:
ERROR com.eventtouch.bc.business.core.log.LoggingInterceptor - org.hibernate.HibernateException: More than one row with the given identifier was found: 4211, for class: com.eventtouch.bc.business.domain.LocalizedLabel
任何有关使用@Where子句映射@OneToOne关系的想法吗?
感谢
我做到了,但错误仍然存在! – Gabriel 2010-04-23 08:56:33