Hi Dirk,
ModuleModel should have an attribute of type ActivityModel. This is the attribute
name the reference descriptor is looking for. It also appears that your package names
do not correspond
de.premiere.plato.app.activity.entity.ActivityModel != de.activity.entity.ActivityModel
I assume this is a C&P oversight.
Public class ModuleModel {
Integer intActivityIdFK;
ActivityModel activity;
...
}
<reference-descriptor name="activity"
class-ref="de.activity.entity.ActivityModel"
refresh="true"
auto-retrieve="true">
<foreignkey field-ref="intActivityIdFK" />
</reference-descriptor>
Hope this helps.
Wally
-----Original Message-----
From: Dirk Manske (Service Respond) [mailto:[EMAIL PROTECTED] On Behalf Of Dirk Manske
Sent: Monday, December 29, 2003 1:14 PM
To: 'OJB Users List'
Subject: AW: ClassPersistenceNotCapableException: java.lang.Integer not found ...
Sensitivity: Personal
Thanks for your answer. When I change the reference name to xxxx I get a
MetadataException which states that it can't find a member xxxx in
de.plato.app.activity.entity.ModuleModel. Of course there is no member xxxx in this
class since I declared all attributes already in the class-descriptor. Any idea?
Dirk
-----Urspr�ngliche Nachricht-----
Von: Jo�o Vieira da Luz [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 29. Dezember 2003 19:51
An: 'OJB Users List'
Betreff: RE: ClassPersistenceNotCapableException: java.lang.Integer not found ...
Vertraulichkeit: Pers�nlich
I think your problem is in the name of the reference-descriptor it has the same name
that field 4. Try to change the name and I think it will work fine.
-----Original Message-----
From: Dirk Manske (Service Respond) [mailto:[EMAIL PROTECTED]
Sent: segunda-feira, 29 de Dezembro de 2003 18:43
To: [EMAIL PROTECTED]
Subject: ClassPersistenceNotCapableException: java.lang.Integer not found ...
Sensitivity: Personal
Hi,
Can someone tell me how to set a reference-descriptor for a foreign key? Below is an
excerpt of my repository-user.xml file. I always get the error
message: ClassPersistenceNotCapableException: java.lang.Integer not found in
repository.xml ... I have no clue what to do. Thx,
Dirk
<class-descriptor class="de.activity.entity.ActivityModel"
table="TPACTIVITY" >
<field-descriptor id="1" name="intActivityId" column="ACTIVITY_ID"
jdbc-type="INTEGER" primarykey="true" autoincrement="true" />
<field-descriptor id="2" name="strActivityName"
column="ACTIVITY_NAME" jdbc-type="CHAR" />
</class-descriptor>
<class-descriptor class="de.activity.entity.ModuleModel" table="TMODULE" >
<field-descriptor id="1" name="intModuleAssignedId" column="MODUL_ASSIGNED_ID"
jdbc-type="INTEGER" primarykey="true" autoincrement="true" />
<field-descriptor id="2" name="intModuleId" column="MODUL_ID"
jdbc-type="INTEGER" />
<field-descriptor id="3" name="strModuleExclusive" column="SIMULTAN_WORK"
jdbc-type="CHAR" />
<field-descriptor id="4" name="intActivityIdFK" column="ACTIVITY_ID"
jdbc-type="INTEGER" />
<reference-descriptor name="intActivityIdFK"
class-ref="de.premiere.plato.app.activity.entity.ActivityModel"
refresh="true"
auto-retrieve="true">
<foreignkey field-id-ref="4" />
</reference-descriptor>
</class-descriptor>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]