I asked this about a week ago and received no response so I will try again as seems to 
be a simple question.

I have a 1:n mapping like this. BasePortletApplicationDefinition has a number of 
portlets assoc. with and each portlet has a reference back to its parent application.  
The problem I am encountering is that, when I persist the portlet application, the 
portlets do get persisted, however, the "appId" which is the FK back to the 
application, does not get populated.  What is even stranger is that if I remove the 
reference-descriptor from the portlet mapping, the "appId" now gets populated!  
Unfortunately, the application fails to materialize within the portlet since the 
reference-descriptor has been removed.  I'm using ODMG to do updates and inserts.  
This issue is happening in both rc3 and rc4.


<class-descriptor
  class=" BasePortletApplicationDefinition"
  table="PORTLET_APPLICATION"
>
  <field-descriptor
   name="id"
   column="APPLICATION_ID"
   jdbc-type="INTEGER"
   primarykey="true"
   autoincrement="true"
   conversion="ObjectIDtoLongFieldConversion"
  />

<collection-descriptor
 name="portlets"
 auto-delete="true"
 element-class-ref="PortletDefinitionComposite"
 collection-class="BasePortletDefinitionList"
>
  <inverse-foreignkey field-ref="appId"/>
</collection-descriptor>
</class-descriptor>

<class-descriptor
 class="BasePortletDefinition"
 table="PORTLET_DEFINITION"
>
  <field-descriptor
   name="id"
   column="ID"
   jdbc-type="INTEGER"
   primarykey="true"
   autoincrement="true"
   conversion="ObjectIDtoLongFieldConversion"
  />
  <field-descriptor
   name="appId"
   column="APPLICATION_ID"
   jdbc-type="INTEGER"
   conversion="ObjectIDtoLongFieldConversion"
  />

  <reference-descriptor 
   name="app" 
   class-ref="BasePortletApplicationDefinition" 
  >         
    <foreignkey field-ref="appId"/>
  </reference-descriptor>
</class-descriptor>

*===================================*
* Scott T Weaver������������������� *
* Jakarta Jetspeed Portal Project�� *
* [EMAIL PROTECTED] *
*===================================*
� 


Reply via email to