Martin commented on Bug HHH-7548

//...this is the entity with a whitespace char
@Entity
@Table(name="TSP010")
public class Test

{ @Id @GeneratedValue int id; char value = ' '; }

//...this is the test case
EntityManagerFactory emf = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT);

//...insert
Object id;
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
Test t = new Test();
em.persist(t);
id = t.getId();
em.getTransaction().commit();
em.close();

//...select fails with StringIndexOutOfBoundsException!!!
//because of the char property
em = emf.createEntityManager();
em.getTransaction().begin();
t = em.find(Test.class, id);
em.getTransaction().commit();
em.close();

emf.close();

assertTrue(' ' == t.getValue());

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira