| Summary: | Missing table attribute processing results in error | ||
|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Kevin Sutter <kwsutter> |
| Component: | General | Assignee: | Karen Butzke <karenfbutzke> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 0.5 | ||
| Target Milestone: | 0.5 M3 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
I'm trying to decide if this is an enhancement request or a bug, but since it does cause an error we can probably leave it as a bug. We don't currently support SecondaryTables, so that would be the enhancement request part. I am not positive on how the spec handles this. To define the table attribute on the @Column, does it have to match one of your SecondaryTables(or primary table), or is this another way to handle multiple tables for an Entity? Basically, I am wondering if it would be an error condition to specify a table on the Column annotation that isn't specified on the Entity, or if it implies a SecondaryTable defined with the default joinColumns. Karen, Good question. My interpretation of the JPA spec is that the "table" attribute should reference one of the SecondaryTables defined for the Entity. So, if you don't support SecondaryTables at this time, then that would explain the error that I am seeing. If you want (or need) to change this to an enhancement, that would be okay with me. Thanks, Kevin FYI... Just got clarification from the EJB3 Expert Group that the "table" attribute in the @Column annotation must, in fact, assume that the secondary table is already defined and should not cause it to be defined. Cool, we can hope we didn't give them any ideas for more defaults :) Fixed the situation for Column annotations. Also need to fix it for JoinColumns, JoinColumns in JoinTable, and AttributeOverrides fixed for joinColumns and attributeOverrides Looks good. Thanks. Closing Verified Fixed bugs from 0.5. |
Hi, I had written a bug report (#136321) about missing attributes on the Persistence Panel. One of them was the table attribute on the @Column annotation. Since this seems to cause an error for me (and not just a missing panel attribute), I thought it was worth a separate defect. When I attempt to identify a separate table for the @Column annotation, it doesn't seem like it's getting processed. I am getting an error that it can't find the EMP_SAL column. But, it's not looking in the EMP_SALARY table, it seems to be looking in the primary table for this Entity. @Column(table="EMP_SALARY", name="EMP_SAL") public Long getSalary() { return salary; } public void setSalary(Long salary) { this.salary = salary; } Severity Description Resource In Folder Location Creation Time Id 2 Column "EMP_SAL" cannot be resolved Employee.java jpa.dali/src/com/ibm/ws/persistence/spec/complex line 0 April 12, 2006 11:32:33 AM 20961 Let me know if you need any additional data. Thanks, Kevin