1 Reply Latest reply on Mar 1, 2003 7:30 AM by larsb

    How to "find" by multiple PKs?

    zorzella

      Hi,

      is there any way to have a finder method that returns a Collection, with a WHERE clause that accepts an indefinite number of PKs? Something that would allow me to do something like:

      List pks = new Vector ();
      pks.add ("1");
      pks.add ("2");
      Collection c = myHome.findByPks (pks);

      Thanks,

      Zorzella

        • 1. Re: How to "find" by multiple PKs?
          larsb

          This is possible with BMP entities since you code the finder method. I do not think you can do this with JBoss CMP (although, it should not be too difficult to add this kind of feature).

          Lars