I have defined the following finder for the relationship (Account has many
Users) - (User has One Account):

<query>
  <query-method>
    <method-name>findByAccountLogin</method-name>
    <method-params>
      <method-param>java.lang.String</method-param>
      <method-param>java.lang.String</method-param>
    </method-params>
  </query-method>
  <ejb-ql>
    FROM com.indnet.symbiosis.model.User u WHERE u.account.id = ?1 and
u.login = ?2
  </ejb-ql>
</query>

Here is what Orion generates in orion-ejb-jar.xml:

<finder-method query="">
  <!-- Generated SQL: "select Users.id, Users.firstName, Users.middleName,
Users.lastName, Users.birthDate, Users.gender, Users.userLogin,
Users.userPassword, Users.accountId, Users.scheduleId, Users.superuser from
Users" -->
  <method>
    <ejb-name>com.indnet.symbiosis.model.entity.User</ejb-name>
    <method-name>findByAccountLogin</method-name>
    <method-params>
      <method-param>java.lang.String</method-param>
      <method-param>java.lang.String</method-param>
    </method-params>
  </method>
</finder-method>

Thanks.
-AP_



Reply via email to