I have a CMP EJB (UserBean) with several non persistent fields, and I would like to include these fields in an automatically generated value object. These fields are derived from other persistent fields, or from some select methods. Is it possible to do such thing? How? I've tried to do it, but I didn't succeed. After taking a look at the templates I thought this wasn't possible, as the templates use the XDtEjbPersistent:forAllPersistentFields tag for generating the fields for the value object and setting the fields in the getXXXValue method of the CMP entity class. But after generating the sources, I get the following: In the UserValue class: In the UserCMP class:private java.lang.String code; UserValue.setCode( getCode() ); UserValue.setAdmin( getAdmin() ); UserValue.setAbsent( getAbsent() ); if ( getSubstitute() != null ) UserValue.setSubstitute( getSubstitute().getUserValue() ); UserValue.clearDepartments(); java.util.Iterator iDepartment = getDepartmentsAbleToPurchaseFor().iterator(); while (iDepartment.hasNext()){ UserValue.addDepartment( ((com.actaris.eprocurement.domain.organization.LocalDepartment)iDepartment.next()).getDepartmentValue() ); } UserValue.cleanDepartment(); As you can see, there are a lot of fields that get generated in the value object, but only some of them (the persistent fields) are set in the getUserValue method. Is this a bug? Regards Jose |
- Re: [Xdoclet-user] Possible BUG: How to include non pe... Jose Gonzalez Gomez
- Re: [Xdoclet-user] Possible BUG: How to include n... Jose Gonzalez Gomez