@OneToMany( mappedBy = "campaignChallenge" )
@OrderBy( "challengeGameNumber ASC" )
public List<ChallengeGame> getChallengeGames() {
return challengeGames;
}
在上面的示例中,我使用JPA进行注释。当我调用getChallengeGames方法时,它会自动创建一个查询。
选择challengeg0_.campaign_challenge_id如campaign6_2_,challengeg0_.challenge_game_id如challenge1_2_,challengeg0_.challenge_game_id如challenge1_5_1_,challengeg0_.campaign_challenge_id如campaign6_5_1_,challengeg0_.challenge_game_number如challenge2_5_1_,challengeg0_.field_art_logo_url如field3_5_1_,challengeg0_.game_mode_id如game7_5_1_,challengeg0_.goal如goal5_1_,challengeg0_.team_group_id为team8_5_1_,challengeg0_.user_team_origin为user5_5_1_,teamgroup1_.team_group_id为team1_63_0_,teamgroup1_.affiliation为affiliat2_63_0_,teamgroup1_.hidden为hidden63_0_,teamgroup1_.name为name63_0_,teamgroup1_.team_group_type为team5_63_0_ from challenge_game challengeg0_ left outer join team_group teamgroup1_ on challengeg0_.team_group_id = teamgroup1_.team_group_id其中challengeg0_.campaign_challenge_id =?按challengeg0_.challenge_game_number ASC命令
有没有让它使用hibernate查询缓存?如果我直接创建查询,我需要使用jpa调用将提示设置为缓存。是否有注释等效?
答案 0 :(得分:1)