Just getting id column value not using join in hibernate object one to many relation

前端 未结 3 900
南笙
南笙 2020-12-06 19:43

I\'m using hibernate 4+.

I have two sample tables.

Table A

public class A {
  @Id
  private int id;

  @OneToMany(fetch=LAZY)
  private List&         


        
3条回答
  •  醉梦人生
    2020-12-06 20:22

    I think you can use this post : property access strategy

    It is said that the lazy loading will not be triggered if you only access id

提交回复
热议问题