SDE 4.1 for Eclipse

Hi, i have this problem.

I have a one class diagram with 3 classes, each class is type of “ORM Persistable”. From Eclipse i launch the function Modeling–>ORM–>Generate Code and the tool generates the code for my classes.
Is there the way to delete (or don’t generate) hibernate annotation (@org.hibernate.annotations.GenericGenerator or @org.hibernate.annotations.Proxy(lazy=false))?
After that, i have the code of my classes, if i change the code is possible to synchronize the ORM classes into class diagram? with function “Update UML Model” i can’t do it, is there aother way? With “Update UML Model” i can synchronize only normal class without “ORM Persistable” stereotype.

Thanks
Stefano

Dear spalazzi,

Thank you for your message. About the code synchronization, we are sorry that currently the code-model synchronization is not cover the ORM Persistable class (they will not involve in code synchronization). And for the annotation issue, do you mean you would like to generate the ORM layer without using annotation (using the XML)?

Best regards,
Rain Wong

Thank for your respons. I want remove only hibernate annotation because I use EJB entity bean’s persistence.

For example, in my project i use this POJO:

/**

  • ORM-Persistable Class
    */
    @Entity
    @Table(name=“Tecnico”)
    public class Tecnico extends BaseEntity {
    public Tecnico() {
    }

    public Tecnico(Long id) {
    this.ID=id;
    }

    @Column(name=“Nominativo”, nullable=true, length=100)
    private String nominativo;

    @Column(name=“CostoGiornaliero”, nullable=true, length=10)
    private java.math.BigDecimal costoGiornaliero;

    @Column(name=“SedeLavoro”, nullable=true, length=255)
    private String sedeLavoro;

    @Column(name=“Matricola”, nullable=true, length=10)
    private Integer matricola;

    @Column(name=“ID”, nullable=false)
    @Id
    private Long ID;

    }

while the same POJO that VP generates is:
/**

  • ORM-Persistable Class
    */
    @Entity
    @Table(name=“Tecnico”)
    @org.hibernate.annotations.Proxy(lazy=false)
    public class Tecnico implements Serializable {
    public Tecnico() {
    }

    public Tecnico(Long id) {
    this.ID=id;
    }

    @Column(name=“Nominativo”, nullable=true, length=100)
    private String nominativo;

    @Column(name=“CostoGiornaliero”, nullable=true, precision=19, scale=0)
    private java.math.BigDecimal costoGiornaliero;

    @Column(name=“SedeLavoro”, nullable=true, length=255)
    private String sedeLavoro;

    @Column(name=“Matricola”, nullable=true, length=10)
    private Integer matricola;

    @Column(name=“ID”, nullable=false)
    @Id
    @GeneratedValue(generator=“VAC10210E1175DB4025800CD9”)
    @org.hibernate.annotations.GenericGenerator(name=“VAC10210E1175DB4025800CD9”, strategy=“native”)
    private Long ID;


}

So i can use hibernate or another ORM mapper implementation without change POJO that implements my model.

Thank bye
Stefano