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