Meaningless Drivel is fun!*
The moose likes EJB and other Java EE Technologies and the fly likes EJB3 + Return type for database count query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB3 + Return type for database count query" Watch "EJB3 + Return type for database count query" New topic
Author

EJB3 + Return type for database count query

akhil achuthan
Ranch Hand

Joined: Mar 29, 2006
Posts: 69
in my application i have a query that ultimately returns a count(eg: select count(*) from TABLE_NAME ....). Executing this as a native query with ejb3's entity manager, I got a BigInteger as the return type. But another query executed the same way on another table returned me Long instead of BinInteger. Why is this so.. i mean why are the data types changing for the count operation returns? Is there any dependency that the can change the return type of the COUNT operation?
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

"dragon bull" please check your private messages for an important administrative matter. You can see them by clicking the My Private Messages link above.


SCJP, SCWCD.
|Asking Good Questions|
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB3 + Return type for database count query
 
Similar Threads
Problem with a native query in JPA
Servlet access to MBean in JBoss
Checking if a record exists
SQL Question: Getting the rank
ResultSet Manipulation