I'm not sure how to return multiple objects in a criteria query (or even if it is possible), but you could try something like:
Code:
Criteria crit = session.createCriteria(City.class)
.createCriteria("buildings")
.add(Expression.eq("buildingOwner.name", name)
or
Code:
Criteria crit = session.createCriteria(City.class)
.createCriteria("buildings")
.createCriteria("buildingOwner)
.add(Expression.eq("name", name)
I haven't tried multiple join paths in an Expression either (first example) but it may work....
This should return a list of Cities objects and you can throw out duplicates/navigate the tree.