APAR status
Closed as program error.
Error description
The JPA to UML transform generates a UML model which causes various problems when using this model to do UML to JPA transform, including compile errors and runtime errors. A. @JoinColumn annotations are generated with blank referencedColumnName. E.g. @JoinColumn(name = 'XXX_XXX_XXX', referencedColumnName = '') B. The original JPA source code has @Column annotations in XXXXXPK.java at the top of the class, but these are not translated into ??Column???Id?? for primary key columns in the UML model. ??Column?? is missing. C. For entities with One-Many relationships there are collection type fields with duplicate names, and you get a compile error. D. For entities with One-Many relationships there are duplicated NamedQuery and you get a compile error.
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: * **************************************************************** * PROBLEM DESCRIPTION: * **************************************************************** * RECOMMENDATION: * **************************************************************** (A) During the transform the referenced column name is not checked for null or empty. (B) The transformation was assuming there is no stereotype in the PK file, so the rule that creates the properties was consuming and blocking all the other property rules to run (column is one of them). (C,D) there is one Entity (E1) that has bidirectional relationship to another three entities (E2, E3, E4). E1 has three propertes e2, e3, e4 and each one of them has annotation @mappedby(e1). while all the other Entities has a property (e1) with the join column/table. the JPA to UML transformation was trying to match the properties to define the ends of the three associations and it was only checking by property name ( which is e1 in the three cases) which means the three association was created using (E1.e2, E2.e1) (E1.e2, E3.e1) , (E1.e2, E4.e1) which is not correct ( leads to more than one property of the same name)
Problem conclusion
(A) A simple check was added to determine if the referenced column name is null or empty, and if true do not add it. (B) Actually there is no need to consume as each rule is checking for the annotation and will not work if the annotation is not set so that has been corrected. (C,D) The matching was changed to make sure that the property with the same mapped name has the same type of the second Entity, so the generated model from the JPA to UML will be created without errors and then issues C and D will not happen.
Temporary fix
Comments
APAR Information
APAR number
PM10351
Reported component name
SW ARCHITECT WI
Reported component ID
5724I7001
Reported release
754
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2010-03-18
Closed date
2010-10-08
Last modified date
2010-10-08
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
SW ARCHITECT WI
Fixed component ID
5724I7001
Applicable component levels
R754 PSN
UP
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSYKBQ","label":"Rational Software Architect Designer for WebSphere Software"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"754","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS4JCV","label":"Rational Software Architect for WebSphere Software"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"754","Edition":"","Line of Business":{"code":"LOB15","label":"Integration"}}]
Document Information
Modified date:
08 October 2010