facebook

Adding CMP fields

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #214099 Reply

    John
    Member

    Is there a quick way to add CMP fields to an Entity EJB?
    Some IDEs have the option to create CMPs in the add ejb wizard.
    I want several CMP fields that are not part of the primary key.

    Thank You For Your Time in Reading this.

    #214121 Reply

    Greg
    Member

    The entity bean wizard in MyEclipse by default puts the xdoclet tags needed to create a CMP at the top level. However, the only way to add CMP fields is just to manually add the getter/setter fields with the corresponding xdoclet tag:

    
    /**
     * @ejb.persistent-field
     * @ejb.persistence
     *       column-name="fieldName"
     *       sql-type="VARCHAR"
     */
    public abstract String getFieldName();
    public abstract void setFieldName(String str);
    
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Adding CMP fields

You must be logged in to post in the forum log in