| Summary: | Unable to create JPA project with orm.xml containing many-to-one with a join-column | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Karen Butzke <karenfbutzke> | ||||
| Component: | JPA | Assignee: | Karen Butzke <karenfbutzke> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P1 | CC: | neil.hauge | ||||
| Version: | 3.1 | Flags: | neil.hauge:
review+
|
||||
| Target Milestone: | 3.1 RC3 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 207330 [details]
proposed patch against HEAD
checked in to HEAD for 3.1RC3 For completeness: This fix was required to fix a stop-ship regression in our XML mapping file support. The fix is small, isolated, and low risk. The fix was modeled after other similar code changes that were missed in this case. The fix was reviewed and tested by me. See comment #2. |
Create a JPA project and create and orm.xml mapping file that contains the following entity and many-to-one mapping. Clean the project and you get an NPE logged and a JPA validation error 'This project has the JPA facet, but no JPA project could be created. See the error log for more details.' <entity class="model.foo"> <attributes> <many-to-one name="bar"> <join-column/> </many-to-one> </attributes> </entity> Nested exception 2: java.lang.NullPointerException at org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmNamedColumn.buildDefaultName(AbstractOrmNamedColumn.java:165) at org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmNamedColumn.update(AbstractOrmNamedColumn.java:85) at org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmBaseColumn.update(AbstractOrmBaseColumn.java:70)