1 Reply Latest reply on Jan 7, 2004 1:31 AM by Toshiya Kobayahsi

    NoSuchEntityException Iterating over a Collection  returned

    Daniel Silcox Newbie

      Posting a solution to a problem I was having...

      I have a ejb-ql findByGetAll clause for one of my entity beans that returns a collection of objects. This particular Entity utilizes a Primary Key Class.

      When I was Iterating through the collection I kept receiving a javax.ejb.NoSuchEntityException: Entity not found: primaryKey=... Error anytime there was more than one object returned in the Collection.

      The solution to this problem was to overide equals in my primary key class.