The following is the Oracle DB define:
classId char(8) userId char(1)
666666 2
I'm creating a query to get a list from DB with EclipseLink 2.3.1. the following is the code.
Query query = em.createQuery("select classId from user where userId = ?")
query.setParameter(1,"2");
List<Object[]> list = query.getResultList();
But I get the classId is "666666" not "666666 ". It seems the query.getResultList() auto delete the whitespace? Why?