Hibernate query for multiple items in a collection

后端 未结 5 630
灰色年华
灰色年华 2021-02-14 01:24

I have a data model that looks something like this:

public class Item {
    private List attributes;
    // other stuff
}

public class Item         


        
5条回答
  •  长发绾君心
    2021-02-14 01:44

    Use LEFT_OUTER_JOIN to prevent "WHERE x = 1 AND x = 2" kind of issue

    CreateAlias("itemAttributes", "ia", JoinType.LEFT_OUTER_JOIN)

提交回复
热议问题