| Given the following mapping:
@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;
Currently, the query for loading Team#expertAndHighLevelPlayers would have something like: {{active = 1 and level = 'expert' or level = 'high' }}. Parentheses should be added to ensure that the separate clauses have the proper precedence, as in: {{( active = 1 ) and ( level = 'expert' or level = 'high' ) }}. |