Hello all,
I searched about the problem, could not find a exact solution. The hibernate version is 3.2.6.
There is a Product entity. Its id property is defined as:
@Table(schema = "AAAA", name = "PRODUCT") public class Product implements Serializable { private static final long serialVersionUID = 1L;
@Column(name = "ID", nullable = false) @Basic(fetch = FetchType.EAGER) @Id Integer id; ......
When I run a native query, it returns me a list of BigDecimal instead of Integer.
Query nQuery=entityManager.createNativeQuery("Select id from Product"); List<Object> result=nQuery.getResultList();
The result is [2002], but its type is BigDecimal.
Can you please help?
|