From: Luca Dall'O. (JIRA) <ji...@an...> - 2007-07-24 09:13:20
|
Composite <<Identifier>> and Value Object ----------------------------------------- Key: EJB-71 URL: http://jira.andromda.org/browse/EJB-71 Project: EJB Cartridge Type: Bug Reporter: Luca Dall'Olio Assigned to: Vance Karimi Mapping a composite PK using <<Identifier>> stereotype somehow breaks creation of <<ValueObject>>, since every field having the <<Identifier>> stereotype is created inside a PK embedded object, so the Entity-To-ValueObject conversion template cannot locate it. Example : <<Entity>> Person <<Identifier>> +id : Long <<Identifier>> +tag : String || || || \/ <<ValueObject>> PersonVO +id : Long +tag : String throws a "cannot find symbol : method getId() ... cannot find symbol : method getTag()" in class PersonDaoBase : public void toPersonVO(Person source, PersonVO target) ... target.setId(source.getId()); target.setTag(source.getTag()); } these field are in fact generated inside PersonPK, so code should be like this : public void toPersonVO(Person source, PersonVO target) ... target.setId(source.getPk().getId()); target.setTag(source.getPk().getTag()); } This forum topic is about the same problem: http://galaxy.andromda.org/forum/viewtopic.php?t=4937 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.andromda.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |