0 Replies Latest reply on Sep 23, 2002 7:13 PM by KimJohn Quinn

    findByPrimaryKey - returns a Collection?

    KimJohn Quinn Newbie

      Quick question abt implementing the "findByPrimaryKey" method in a EJB...

      I am using JBoss 3.0.2 and for some reason my findByPrimaryKey wants to return to me a collection even though the actual method is returns the entity type.

      The reason I know it returns a collection is:

      1) I traced the error to JBoss source and it is in the return call for a collection

      2) When I create a method that is exactly the same but returns a collection it returns to me a List of size 1 and if i extract that element it is correct.

      My question without going into a lot of detail is does anyone know why this would happen or what causes it? I am not doing anything odd with the EJB, in fact, it is just a plain bean.

      Any help would be appreciated...thanks.