Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB3 + Return type for database count query

 
akhil achuthan
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"dragon bull" please check your private messages for an important administrative matter. You can see them by clicking the My Private Messages link above.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic