s.save(simple, new Long(10) );
Query q = s.createQuery("from Simple s where s.name=:name and s.count=:count");
q.setProperties(simple);
assertTrue( q.list().get(0)==simple );
//misuse of "Single" as a propertyobject, but it was the first testclass i found with a collection ;)
Single single = new Single() { // trivial hack to test properties with arrays.
String[] getStuff() { return (String[]) getSeveral().toArray(new String[getSeveral().size()]); }
};
List l = new ArrayList();
l.add("Simple 1");
l.add("Slimeball");
single.setSeveral(l);
q = s.createQuery("from Simple s where s.name in (:several)");
q.setProperties(single);
assertTrue( q.list().get(0)==simple );