Gary Bennett penned > I've been trying to create an EJB with a composite key using > xdocltet. > Whenever I try to generate it XDoclet throws out the following. 'There > com.premita.dcp.ejb.Service_ElementBean bean has a compound key. > Please > specify pk-field'
It seemed you were specifying pk-field for multiple fields along with the PK class itself, so I don't see the issue. I did see a few things that look a little suspect, though. First, @ejb.persistent-field is deprecated and not needed -- perhaps it's confusing XDoclet? Also, you specified several fields as having a SQL type of "INT" and JDBC type as "VARCHAR", yet the Java type was Integer. Here's how I've defined the PK in all of my classes. Mind you, I'm not using composite keys nor PK classes, but this should look the same since I'm specifying (unnecessarily in my case) pk-field. /** * Returns the unique ID of this entity bean. * * @ejb.pk-field * @ejb.interface-method * @ejb.transaction type="Supports" * @ejb.persistence column-name="id" */ public abstract Integer getId ( ) ; Good luck! -- David Harkness Sony Pictures Digital Sr. Software Engineer 310.482.4756 [EMAIL PROTECTED] A computer lets you make more mistakes faster than any other invention, with the possible exceptions of handguns and Tequilla. -- Mitch Ratcliffe ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ xdoclet-user mailing list xdoclet-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-user