Hibernate's documentation is written: Collection Filter is a special query for a persistent collection or array. The query string can reference this, meaning that the current array element I think this is a bit of hard work. In fact, his role is to filter out the data you don't need, then return the result set to you. Now give an example to explain: String HQL = "SELECT P from picgroup p.IIN P.Images T where p.id =" groupid; query query = session.createQuery (HQL); List list = query.list ();
Picgroup group = (picgroup) list.get (0); view.setname (Group.getName ()); View.setId (GroupID);
Collection image = session.filter (Group.getimages (), "Select this where this.state = 'c'); // This only removes the data equally C's data Iterator ITE = image.iterator (); look, just Simple. Generally, in a pair or more, multiple-to-multi-relationships are used from one part of the additional party.