HQL表连接使用

Audio为音频表,AudioTypeAudios为类型关联表,Audio OneToMany AudioTypeAudio ,audioTypeAuios为Audio表中Set集合



HQL hql=new HQL();



hql.setHql("from Audio as a left join fetch a.audioTypeAudios as ata where a.weatherAudit=false and a.user.strId='"+ uid + "'");


你可能感兴趣的:(HQL)