| Summary: | Refactoring NPE moving an id class that is specified in java | ||
|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Karen Butzke <karenfbutzke> |
| Component: | JPA | Assignee: | Karen Butzke <karenfbutzke> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jolene.moffitt |
| Version: | 3.1 | ||
| Target Milestone: | 3.2 M6 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
fixed in M6 Verified in Build I-3.4.0-20120223091229 Verified when you refactor/move a class no NPE appears and the class is updated in correctly. See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.2_M6 |
Employee and EmployeeId are specified in com.foo package @Entity @IdClass(EmployeeId.class) public class Employee { } <entity class="com.foo.Employee"> <attributes> <id name="id"> </id> </attributes> </entity> Move the EmployeeId class to another package and the following NPE occurs because it is attempting to rename the id-class reference in the orm.xml when none exists. java.lang.NullPointerException at org.eclipse.jpt.jpa.core.internal.context.orm.GenericOrmIdClassReference.createRenamePackageEdit(GenericOrmIdClassReference.java:323) at org.eclipse.jpt.jpa.core.internal.context.orm.GenericOrmIdClassReference.createMoveTypeEdits(GenericOrmIdClassReference.java:312) at org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmEntity.createIdClassMoveTypeEdits(AbstractOrmEntity.java:1706) at org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmEntity.createMoveTypeEdits(AbstractOrmEntity.java:1702)