Suppose I have an entity bean X containing several CMR 1:1 (or m:1) relations to another bean Y.  I would like to use XDoclet to build a value object for X which contains the primary keys of Y for each such relation, under different names (so they don't collide.  So if we have
 
   public abstract YLocal getFirstY();
   public abstract YLocal getSecondY();
 
in class X, I want the generated XDto class to contain methods XDto.getFirstYKey() and XDto.getSecondYKey().
 
Despite a fair amount of experimentation and doc reading, I can't figure out how to make this work.  In fact, I can't even make non-collection CMR fields show up in the DTO as anything but raw Locals, nor can I choose a name to avoid collisions if there are more than one of one type of Local.
 
Can anyone provide an example or a pointer to appropriate information on how to do this?  Thanks very much in advance!
 

Reply via email to