How can I avoid the Warning “firstResult/maxResults specified with collection fetch; applying in memory!” when using Hibernate?

后端 未结 6 1081
长情又很酷
长情又很酷 2020-12-01 09:08

I\'m getting a warning in the Server log \"firstResult/maxResults specified with collection fetch; applying in memory!\". However everything working fine. B

6条回答
  •  佛祖请我去吃肉
    2020-12-01 09:52

    Reason for this warning is that when fetch join is used, order in result sets is defined only by ID of selected entity (and not by join fetched).

    If this sorting in memory is causing problems, do not use firsResult/maxResults with JOIN FETCH.

提交回复
热议问题