Assert.assertEquals("java.lang.IllegalArgumentException: " + GenerationType.class.getSimpleName() + "."
+ GenerationType.TABLE + " Strategy not supported by this client :" + RedisClient.class.getName(),
e.getMessage());
}
RedisGeneratedIdWithOutSequenceGenerator withOutSequenceGenerator = new RedisGeneratedIdWithOutSequenceGenerator();
withOutSequenceGenerator.setName("Kuldeep Kumar");
try
{
em.persist(withOutSequenceGenerator);
List<RedisGeneratedIdWithOutSequenceGenerator> list = em.createQuery(
"Select c from RedisGeneratedIdWithOutSequenceGenerator c").getResultList();
Assert.assertNotNull(list);
Assert.assertEquals(1, list.size());
Assert.assertEquals("Kuldeep Kumar", list.get(0).getName());
Object id = list.get(0).getId();
em.clear();
withOutSequenceGenerator = em.find(RedisGeneratedIdWithOutSequenceGenerator.class, id);
Assert.assertNotNull(withOutSequenceGenerator);
Assert.assertEquals("Kuldeep Kumar", withOutSequenceGenerator.getName());
}
catch (KunderaException e)
{
Assert.fail();
}