我有一个分区表,其中的数据仅填充在子表中(已验证数据)。但是休眠条件list()返回重复的条目。
Criteria criteria = getSession().createCriteria(SomeModel.class); // table referenced by this model is partitioned
criteria.add(Restrictions.eq("xId", x));
criteria.add(Restrictions.eq("yId", y));
criteria.list(); // returns -> arraylist {[obj],[obj]} i.e. same object multiple times. Also, that object data is present only in the child table.