How can I make a JPA OneToOne relation lazy

前端 未结 10 1722
暖寄归人
暖寄归人 2020-11-22 03:34

In this application we are developing, we noticed that a view was particularly slow. I profiled the view and noticed that there was one query executed by hibernate which too

10条回答
  •  甜味超标
    2020-11-22 04:25

    In native Hibernate XML mappings, you can accomplish this by declaring a one-to-one mapping with the constrained attribute set to true. I am not sure what the Hibernate/JPA annotation equivalent of that is, and a quick search of the doc provided no answer, but hopefully that gives you a lead to go on.

提交回复
热议问题