0 Replies Latest reply on Dec 27, 2001 8:10 AM by Jim

    custom finder and duplicate records

    Jim Newbie


      Tomcat3.2.3+JBoss2.4.1, SuSE7.2, jdk1.3.1, Postgresql.

      I am attempting to setup a finder method for a cmp bean. The finder is returning a remote reference but of course the code fails if the finder's generated sql returns more than a single record.

      I really only want a single record - one with the lowest value of a certain column and if there are duplicates then any single record out of those duplicates will do. (as soon as I get the record I will be incrementing the counter - every time)

      The jaws.xml entry looks like this:

      where counter = (select min(u.counter) from mybean u)

      Any suggestions as to how I could implement this?