Given the following mapping: {code:java} @Entity public class Team { ... @OneToMany @Where( level = 'expert' or level = 'high' ) private Set<Player> expertAndHighLevelPlayers; }
@Entity @Where( active = 1 ) public class Player .... private String level; {code}
Currently, the query for loading {{Team#expertAndHighLevelPlayers}} would have be something like: { { code} active = 1 and level = 'expert' or level = 'high' {code } }.
Parentheses should be added to ensure that the separate clauses have the proper precedence, as in: { { code} ( active = 1 ) and ( level = 'expert' or level = 'high' ) {code } } .
|
|