[ http://jira.andromda.org/browse/EJB-117?page=all ]
heapifyman updated EJB-117: --------------------------- Attachment: domain.png > MappedSuperClass wrongly generated if it contains an operation > -------------------------------------------------------------- > > Key: EJB-117 > URL: http://jira.andromda.org/browse/EJB-117 > Project: EJB Cartridge > Type: Bug > Versions: 3.3 > Environment: Win XP Pro SP3, Java 1.5.0_19, Maven 2.0.10, andromda-3.3, > ejb-cartridge 1.0-SNAPSHOT, UML 2, MagicDraw 12.1 > Reporter: heapifyman > Assignee: Vance Karimi > Attachments: domain.png > > I have the following model (see also attached image): > interface CaseComponent > +getIdAttribute() : Attribute > ^ > | > | > <<Entity>> > <<MappedSuperClass>> > abstract class CaseComponentImpl implements CaseComponent > ^ > | > | > <<Entity>> > MaterialListe extends CaseComponentImpl > <<Identifier>> +id : Long > There are several other entities which shall also extend CaseComponentImpl. > With this model the cartridge generates the following: > @javax.persistence.MappedSuperclass > public abstract class CaseComponentImplEmbeddable implements Serializable, > CaseComponent > complete with: > @javax.persistence.Id > @javax.persistence.GeneratedValue(strategy = > javax.persistence.GenerationType.AUTO) > @javax.persistence.Column(name = "ID", nullable = false, insertable = true, > updatable = true) > public java.lang.Long getId() > and > @javax.persistence.Entity > @javax.persistence.Table(name = "CASE_COMPONENT_IMPL") > @javax.persistence.NamedQuery(<some query>) > public abstract class CaseComponentImpl extends CaseComponentImplEmbeddable > This seems wrong to me. CaseComponentImplEmbeddable should not have an id and > CaseComponentImpl should not get the @Entity, @Table and @NamedQuery > annotations. > If I make CaseComponentImpl not abstract, CaseComponentImplEmbeddable does > not get the id property, but CaseComponentImpl still gets the @Entity, etc. > annotations and uses the non-existent method getID() in its compareTo method. > Aparty from that MaterialLIste then extends CaseComponentImplEmbeddable, > which does not provide the getIdAttribute method. Thus, I get several > compilation errors. > If I'm not mistaken, my desired class hierarchy should be no problem since I > can deploy it just fine if I create it manually. -- 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 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july