Can I cache a ManyToOne hibernate object without it being lazy loaded?
- by Andrew
@ManyToOne
@JoinColumn(name = "play_template_id", table = "team_play_mapping" )
public Play getPlay() {
return play;
}
public void setPlay( Play play ) {
this.play = play;
}
By default, this is eager loading. Can I get it so that it will read the play object from a cache without making it lazy loading? Am I correct that eager loading will force it to do a join query and hence no caching?