1 Reply Latest reply on Aug 29, 2002 6:57 PM by Dain Sundstrom

    JbossQL problem

    kiuma Newbie

      Hello, I've the following jaws.xml file and
      I don't know why the Principal's findByName finder method doesn't work. I'm currently using jboss v.3.0.1.
      Thanks,
      kiuma

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jaws PUBLIC "-//JBoss//DTD JAWS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jaws_3_0.dtd">


      java:/WebAppointmentsDS
      <type-mapping>PostgreSQL</type-mapping>

      <enterprise-beans>


      <ejb-name>webappointments/Role</ejb-name>

      <cmp-field>
      <field-name>principalId</field-name>
      <column-name>principalid</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>roleGroup</field-name>
      <column-name>rolegroup</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>roleName</field-name>
      <column-name>role</column-name>

      </cmp-field>


      findPrincipalRoles
      <![CDATA[principalId = {0}]]>



      findAnotherByPrincipalAndRole
      <![CDATA[principalid = {0} AND role = {1}]]>



      <table-name>roles</table-name>
      <create-table>false</create-table>
      <remove-table>false</remove-table>
      <row-locking></row-locking>




      <ejb-name>webappointments/RolesDefinition</ejb-name>

      <cmp-field>
      <field-name>description</field-name>
      <column-name>description</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>roleName</field-name>
      <column-name>role</column-name>

      </cmp-field>


      findRoleByName
      <![CDATA[role = {0}]]>



      findAnotherByName
      <![CDATA[role LIKE {0}]]>



      <table-name>rolesdefinition</table-name>
      <create-table>false</create-table>
      <remove-table>false</remove-table>
      <row-locking></row-locking>




      <ejb-name>webappointments/Principal</ejb-name>

      <cmp-field>
      <field-name>password</field-name>
      <column-name>password</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>principalId</field-name>
      <column-name>principalid</column-name>

      </cmp-field>


      findByName
      <![CDATA[principalId = {0}]]>



      findAnotherById
      <![CDATA[principalId = {0}]]>



      <table-name>principals</table-name>
      <create-table>false</create-table>
      <remove-table>false</remove-table>
      <row-locking></row-locking>



      </enterprise-beans>




      -----------------------