}
@Test
public void testGetIms() {
String jpql = "select o from Person o join o.ims i where KEY(i) = :imType and i = :im";
EntityRepository repository = InstanceFactory.getInstance(EntityRepository.class);
List<Person> persons = repository.createJpqlQuery(jpql)
.addParameter("imType", ImType.QQ).addParameter("im", "666666").list();
assertFalse(persons.contains(person1));
assertTrue(persons.contains(person2));
}