Hi,

<meta>
Sorry, if this mail will appear on this list twice. Yesterday I have already posted it through the gmane news<->mail gateway, but mails taking this route apparently have to be approved by a moderator, which didn't happen so far..
</meta>


I have some EntityBeans which have CM relations. The ValueObjects
generated by XDoclet (1.2b3) use arrays of the related VOs in their
accessor methods. If I understand the VO article right, it should use
either Collections or Sets.

These are the tags:

/**
 * @ejb.interface-method
 * @ejb.relation
 *   name="Schema-Project"
 *   role-name="project-has-schemas"
 * @ejb.value-object
 *   aggregate="org.episemaction.server.schema.interfaces.SchemaValue"
 *   aggregate-name="Schema"
 *   members="org.episemaction.server.schema.interfaces.SchemaLocal"
 *   members-name="Schema"
 *   relation="external"
 *   type="Set"
 */
public abstract Set getSchemas();


And this is generated code of the VO:


public org.episemaction.server.schema.interfaces.SchemaValue[]
   getSchemas(){
     return
     (org.episemaction.server.schema.interfaces.SchemaValue[])
       this.Schemas.toArray(
         new org.episemaction.server.schema.interfaces.SchemaValue[
           Schemas.size()
         ]
       );
}


The VO uses a Set internally but converts it to an array for the accessor method. Does anyone know how to prevent this conversion?

regards, konrad






------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to