| Summary: | [Validation] Duplicate Entity validation incorrect in some cases | ||
|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Neil Hauge <neil.hauge> |
| Component: | General | Assignee: | Nan Li <nan.n.li> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | CC: | paul.fullbright |
| Version: | 3.0 | ||
| Target Milestone: | 3.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Neil Hauge
Doesn't EclipseLink only support this in the case that an eclipselink-orm.xml is adding/overriding an entity defined in an orm.xml? i.e. I don't think you can have duplicate entities in *eclipselink-orm.xml* files. And we don't support that use case. So shouldn't we leave that error at least until we do support that use case? (In reply to comment #1) > Doesn't EclipseLink only support this in the case that an eclipselink-orm.xml > is adding/overriding an entity defined in an orm.xml? i.e. I don't think you > can have duplicate entities in *eclipselink-orm.xml* files. No...it actually handles the same entity being defined multiple times in orm.xml files. It will then aggregate the attribute mappings defined in the entities. In the case of attribute mapping collisions, it seems the last one in wins. So for this case, we are adding validation when attribute mappings collide. See bug 204132. After discussing more, it seems we need validation for these cases given that Dali will no longer provide accurate validation in this configuration. The following should be applied when there are duplicate entities defined in any ORM XML files (including EclipseLink ORM XML as we don't yet support the special overriding EL ORM XML). Generic and EclipseLink platforms Message Type: Warning Message: Duplicate entity [0] found in this persistence unit. This configuration is not supported by the tooling and may result in invalid error messages. This issue will be addressed in the fix for bug 204132. |