[EMAIL PROTECTED] wrote: > I am attempting to create a value object for an object on the "1" > side of the relationship. > > Example: DEPT-has-many-EMPs and EMP-belongs-to-one-DEPT > > I want the the EmployeeVO to have a method with the following > signature: public DepartmentVO getDepartment() > > However, the value-object generated is as follows > public Department getDepartment()
You should start by reading the Value Object documentation at http://xdoclet.sourceforge.net/xdoclet/valueobjects.html You'll need to add several tags to get the relation inside the VO as well. > Here are the Xdoclet comments that I am using: > > =============================== > /** > * Get the department > * > * @ejb.interface-method > * > * @ejb.relation > * name="employee-department" > * role-name="employee-department:employee" > * > * @ejb.value-object > * > * @jboss.relation > * fk-constraint = "true" > * fk-column = "DEPARTMENT_FK" > * related-pk-field = "id" > * > */ > public abstract Department getDepartment(); The tags you'll need include (I think): members members-name aggregate (or compose) aggregate-name relation="external" as it's a relation It talks about specifying the return type of the collection (Collection or Set). I assume that you simply don't specify the type since it's the VO and not a collection, but I'm not entirely sure. Finally, you need to add an abstract method for getting the Vos: public abstract DepartmentVO getDepartmentVO(); You should tag it as interface-method, IIRC. You probably need to declare the setDepartmentVO as well. Hopefully this will get you started. David Harkness Sr. Software Engineer Sony Pictures Digital Networks (310) 482-4756 ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id66&op=click _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user