I'm using Resin. It allows in its ejb-jar.xml a <sql-name> element in the <cmr-field> element of an entity bean relationship to identify the name of the database column that holds the foreign key to the referenced bean.
Using xdoclet I'm generating ejb-jar.xml for my entity beans. One thing I haven't been able to figure out is how to make it add the <sql-name> element to the <cmr-field> element. Everything else looks to be fine, but there are no <sql-name> elements.
This makes Resin generate sql like


SELECT o.partner_id, o.name, o.description, o.partner_type FROM v_partners o ...

where the last item in the select should really be o.partner_type_id since it is a FK to the partner types table. If I go and make the <cmr-field> element look like this

<cmr-field >
  <cmr-field-name>partnerType</cmr-field-name>
  <sql-name>partner_type_id</sql-name>
 </cmr-field>

by hand then it works as expected. The whole point of using xdoclet is so that I don't have to do things by hand though.
I've tried using the Resin specific xdoclet tags but they don't seem to be doing anything. My question to the list is: Did the spec leave open how the deployment descriptor tells the container the column name of a relation? Is there not a standard way to do this so that I don't have to use the Resin specific tags? This seems like a very small thing that easily breaks portability between EJB servers.
Any help would be greatly appreciated.
-M@


==========================================================================To 
unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".



Reply via email to