Using Eclipse 3.2.2 and MyEclipse 5.5.1 GA.
I just reverse engineered a view using JPA reverse engineering in MyEclipseIDE and the results were interesting.
The view is based on a UNION of two tables. The name of the view is GLOBAL_EMPLOYEE_MASTER. In the @Table annotation of the Entity bean class, the name attribute is “GLOBAL_EMPLOYEE_MASTER” which is not a name of an existing table. Is this OK? Can the name reference the name of a view and not a table?
Also, it looks like the contents of the GlobalEmployeeMaster.java and GlobalEmployeeMasterId.java classes are reversed (i.e. the embeddable ID class has all the variables and getters/setters from the view while the entity bean class has many @AttributeOverride entries and only getId() and setId() methods).
In the case of reverse engineering a view based on a UNION of two or more tables, how does the rev-eng engine know what columns make up a composite key?
Are these results normal in this scenario or is this a bug? thx.