Hi Antonio,

you have to define also the referenced object in the Auth_perimission class and not only the foreign key.

just adding to Auth_permission:

private Auth_resource auth_resource;

+ setter and getter should do the work...

bye
danilo

Hi:

I cannot find the source of my problem. :-(

Is there a problem is the table has a name: "auth_resource"? (note the "_")

What can be the cause of the error? Please help me. :-D

The beans is pretty simple:

public class Auth_permission implements java.io.Serializable
{
   private Integer    rol_id;
   private Integer    res_id;

   public Integer getRol_id() { return rol_id; }
   public void setRol_id(Integer rol_id) {
      this.rol_id = rol_id;
   }
   //---------------------------------------------------------------------------

public Integer getRes_id() { return res_id; }

   public void setRes_id(Integer res_id) {
      this.res_id = res_id;
   }
}

The fragment in the repository is:

<class-descriptor class="test.Auth_permission" table="AUTH_PERMISSION">
  <field-descriptor name="rol_id" primarykey="true" nullable="false"
column="ROL_ID" jdbc-type="INTEGER"/>
  <field-descriptor name="res_id" primarykey="true" nullable="false"
column="RES_ID" jdbc-type="INTEGER"/>
  <reference-descriptor name="auth_role" class-ref="test.Auth_role"
auto-update="false" auto-delete="false">
    <foreignkey field-ref="rol_id"/>
  </reference-descriptor>
  <reference-descriptor name="auth_resource"
class-ref="test.Auth_resource" auto-update="false" auto-delete="false">
    <foreignkey field-ref="res_id"/>
  </reference-descriptor>
</class-descriptor>
----------------------------
This is the other class that said that cannot find:

<class-descriptor class="test.Auth_resource" table="AUTH_RESOURCE">
  <field-descriptor name="res_id" primarykey="true" nullable="false"
autoincrement="true" sequence-name="auth_resource_res_id_seq"
column="RES_ID" jdbc-type="INTEGER"/>
  <field-descriptor name="res_key" nullable="false" column="RES_KEY"
jdbc-type="VARCHAR"/>
  <field-descriptor name="res_name" nullable="false" column="RES_NAME"
jdbc-type="VARCHAR"/>
  <field-descriptor name="res_enable" column="RES_ENABLE"
jdbc-type="BOOLEAN"/>
  <collection-descriptor name="auth_permissionList"
element-class-ref="test.Auth_permission" auto-update="true"
auto-delete="false">
    <inverse-foreignkey field-ref="res_id"/>
  </collection-descriptor>
</class-descriptor>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Danilo Tommasina, Dipl. Ing. FH Telecom
Software Engineer
RCS Riskmanagement Concepts Systems AG
Technoparkstrasse 1
CH-8005 Zuerich
T: +41 1 445 29 08
[EMAIL PROTECTED]
www.risksys.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to