0 Replies Latest reply on Oct 17, 2003 6:05 PM by eugene44

    jaws sql query wit a complex argument

    eugene44

      Hi,

      How can I write a finder in jaws.xml with a complex argument?



      Example:



      public class AccountBean implements EntityBean

      {

      public Integer acctno; // primary key

      public Person person;



      …

      }



      public class Person

      {

      public String firstName;

      public String lastName;

      }



      Table description looks like

      Table ACCOUNT

      {

      ACCT_NO INT,

      FIRST_NAME VARCHAR,

      LAST_NAME VARCHAR,

      PRIMARY KEY (ACCT_NO)

      }



      Attribute “person” in the bean is mapped to two fields in the table (it is possible).

      I would like to have a finder like

      Account findByPerson(Person person) throws RemoteException, FinderException;



      How the finder should look in jaws.xml? The following does not work





      findByPerson

      <![CDATA[FIRST_NAME = {0}.firstName AND LAST_NAME={0}.lastName]]>





      Does anybody have any suggestions?



      I use EJB1.1 and Jboss 3.2.2



      Thanks.