0 Replies Latest reply on Nov 23, 2002 12:53 PM by Richard Doust

    Problem finder method: Set vs. Collection

    Richard Doust Newbie

      I had written the declaration of a findXXX method in a 2.0 CMP entity bean home interface as returning a Set, knowing that the matching rows would indeed not contain duplicates. When I called the method, I got a ClassCastException thrown by the container generated implementation. (I didn't dig deeper than that, but can.) I decided to try changing the return type of the method to Collection from Set and tried it againg and it worked fine. Can anyone explain this?