Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:

  http://opensource.atlassian.com/projects/xdoclet/secure/ViewIssue.jspa?key=XDT-207


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XDT-207
    Summary: Incorrect ValueObject being generated when PK is String and PK for 
xxxBean is defined in Superclass
       Type: Bug

     Status: Assigned
   Priority: Blocker

 Time Spent: Unknown
   Estimate: 20 minutes

    Project: XDoclet
  Component: EJB Module
   Versions:
             1.2 Beta 1

   Assignee: xdoclet-devel (Use for new issues)
   Reporter: tek1

    Created: Wed, 18 Dec 2002 6:26 AM
    Updated: Wed, 18 Dec 2002 6:26 AM
Environment: XDoclet1.2 Beta1 Latest CVS, JDK1.4.x

Description:
XDoclet is generating the incorrect ValueObject for my entity bean "NameBean".

NameBean and it's superclass, BaseEntityStringIdBean, are defined as follows:



--------------------------------------------------------
/**
 *      
 *      @ejb.pk generate="false"
 */
public abstract class BaseEntityStringIdBean extends BaseEntityBean
{
        private String id;
        
        /**
        * @ejb.pk-field
        * @ejb.interface-method
        * @ejb.persistence column-name="id"
        */
        public abstract String getId( );
        
        /**
        * @ejb.interface-method
        */
        public abstract void setId( String id );
        
}



/**
 * @ejb.bean name="Name" jndi-name="ejb/Name" type="CMP" description="name" 
primkey-field="id"
 * @ejb.finder signature="Collection findAll()" transaction-type="NotSupported" 
unchecked="true"
 * @ejb.interface remote-class="Name"
 * @ejb.persistence table-name="xname"
 * @ejb.value-object match="*" name="Name"
 * @ejb.pk generate="false"
 * 
 * @jboss.create-table "true"
 * @jboss.remove-table "false"
 * @jboss.tuned-updates "true"
 * @jboss.read-only "false"
 *
 * @ejb.finder signature="java.util.Collection findByFirstName(String firstName)"
 * @ejb.finder signature="java.util.Collection findByLastName(String lastName)"
 */
public abstract class NameBean extends BaseEntityStringIdBean implements EntityBean
{
        ...
}
--------------------------------------------------------



i'm getting compile errors in NameValue.java in the following locations:



--------------------------------------------------------
public class NameValue extends java.lang.Object implements java.io.Serializable 
{
   public void setPrimaryKey( java.lang.String pk )
   {
      // it's also nice to update PK object - just in case
      // somebody would ask for it later...
      this.pk = pk;
          setId( pk.id );                       <--  ** compile error **
   }

   public void setId( java.lang.String id )
   {
          this.id = id;
          idHasBeenSet = true;

                pk.setId(id);           <--  ** compile error **
   }

   ...
}
--------------------------------------------------------



it seems like these are occuring because for some reason xdoclet thinks that "pk" is 
an NamePK object, when it's really just a java.lang.String.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.NET email is sponsored by: Order your Holiday Geek Presents Now!
Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated Soap,
MP3 Players,  XBox Games,  Flying Saucers,  WebCams,  Smart Putty.
T H I N K G E E K . C O M       http://www.thinkgeek.com/sf/
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to