0 Replies Latest reply on Sep 5, 2003 4:08 AM by Andrzej Roszkowski

    Dynamic EJBQL SELECT

    Andrzej Roszkowski Newbie

      Hi!

      Is there any way to define dynamic EJBQL query ? I mean - select or finder method that uses additional WHERE clause parameters if parameter is not null or empty? ie. my CMP bean has 4 fields field1,field2,field3,field4. method findBySth(String paramField1 ,...,String paramField4)

      if paramField1 is not null or empty where clause will be WHERE o.paramField = ?1 if paramField 1 and 2 : WHERE o.paramField1 = ?1 and o.paramField2 =?2 etc...

      ? is there any way to do this in CMP? in BMP its easy ;)