Hello guys,

I am using OJB rc3.
I pasted the mapping I use in my application below. The problem is the following: when I try to created an entry of ObligatoryProfileEntity I would expect that the reference field ObligatoryProfileURLEntity.url create the entry in the URL table, and just then it would attempt to insert the element of the collection ObligatoryProfileEntity.obligatoryProfileURLEntities.


But what is happening is that I get a Foreign Key Exception when I try to create ObligatoryProfileEntity in the table.

Am I missing something, or is this not the expected behavior?
Would I face this problem also in rc4?

Thanks in advance for any help!

-----------------------------------------------
<class-descriptor
class="domain.entity.ObligatoryProfileEntity"
table="obligatory_profile">
. . . .
<collection-descriptor
name="obligatoryProfileURLEntities"
element-class="ObligatoryProfileURLEntity"
element-class-ref="domain.entity.ObligatoryProfileURLEntity"
auto-update="true"
field-ref="personId"
>
<inverse-foreignkey field-ref="personId"/>
</collection-descriptor>
</class-descriptor>



<class-descriptor
class="uol.meetings.domain.entity.ObligatoryProfileURLEntity"
table="obligatoryprofile_url">
. . .
<reference-descriptor
name="url"
field-ref="urlId" class-ref="domain.entity.URLEntity"
uto-update="true">
<foreignkey field-id-ref="5"/>
</reference-descriptor>
</class-descriptor>


<class-descriptor
   class="domain.entity.URLEntity"
   table="url">
   . . .
</class-descriptor>

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


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



Reply via email to