Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » Getting Double instead of BigDecimal when using EntityManager#createNativeQuery()
Getting Double instead of BigDecimal when using EntityManager#createNativeQuery() [message #642932] Fri, 03 December 2010 06:57 Go to next message
Eclipse UserFriend
Hello,
I am executing SQL statements via the JPA EntityManager's method createNativeQuery().

For numerical data (decimals) in the database I get BigDecimals within my Java programm.

Is there a way to tell JPA to return these values as Doubles instead of as BigDecimals?

Regards,
Mik
Re: Getting Double instead of BigDecimal when using EntityManager#createNativeQuery() [message #643356 is a reply to message #642932] Mon, 06 December 2010 10:51 Go to previous message
Eclipse UserFriend
For a raw native query, no, whatever the database returns is returned.

If you define the native query to return an Entity, then the types will be automatically converter to the Entity's types.
Previous Topic:Union
Next Topic:Using Extensions for Schema Generation
Goto Forum:
  


Current Time: Sat Jul 05 22:49:17 EDT 2025

Powered by FUDForum. Page generated in 0.03060 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top