• Post Reply Bookmark Topic Watch Topic
  • New Topic

Return type of finder

 
geeta Paygude
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have one question on return type of EJB's findr methods.
Speciication says, you ejb's finderMethods may return java.util.Set which will not contain suplicates and will return the unique result set as compared to java.util.Collection.

But i am trying one finder query ,in which if i use collection as return type is works fine,but if for the same query if i use Set it gives me ClassCastException.
The EjbQL which i have written is a simple select query.

So can you tell me whats going wrong .
And please suggest some links which will educate me more on return type of entitybeans.
 
Shailesh Kini
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

It would be helpful if you could attach the code, but I do not think this to be a Set/Collection issue, but something to do with casting during runtime.
Please check if you are casting an object into some other type.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!