Hi everyone,
I´m trying to use the @Where annotation at level class, but this is ignored by hibernate (case 1). However, if I put that annotation to level method this works properly (case 2).
Could anybody tell me what is wrong in the case 1?
Note: I´m using Hibernate 3.5.6-Final.
Case 1 :
Code:
@Entity
@Table
public class A{
@OneToMany
@JoinColumn(name="column")
private List<B> entitiesB;
}
@Entity
@Table
@Where(clause="some condition = true")
public class B{
@ManyToOne
@JoinColumn(name="column")
private A entityA;
}
Case 2 :
Code:
@Entity
@Table
public class A{
@OneToMany
@JoinColumn(name="column")
@Where(clause="some condition = true")
private List<B> entitiesB;
}
@Entity
@Table
public class B{
@ManyToOne
@JoinColumn(name="column")
private A entityA;
}