Use orm.xml file to define entities

Description

The way the EJB3 cartridge works today, named queries, unique constraints and table name for entities are defined using annotations. If you model a transient method on an entity in your model, these annotations will be added to a class generated once in src/main/java directory. It means if you change the table name for the entity, add or update a named query, it will not be token in account by AndroMDA, you will have to change the classes in src/main/java by hand. Not acceptable for a MDA too !

To avoid this, I made some changes to EJB3 cartridge so that annotations at entity level (@Table, @NamedQuery, ...) are replaced by tags in orm.xml file. Annotations are still used to define entity columns.

More infos on this topic of the forum : http://galaxy.andromda.org/forum/viewtopic.php?t=4946

Environment

AndroMDA 3.4-SNAPSHOT + EJB3 cartridge

Assignee

Former user

Reporter

Olivier THIERRY

Labels

None

Components

Priority

Critical
Configure