| Summary: | [API] Validation for virtual attributes does not currently work | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Neil Hauge <neil.hauge> | ||||
| Component: | General | Assignee: | Brian Vosburgh <brian.vosburgh> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | david_williams | ||||
| Version: | 3.0 | Keywords: | api | ||||
| Target Milestone: | 3.0 M7 | Flags: | david_williams:
pmc_approved+
neil.hauge: pmc_approved? (raghunathan.srinivasan) neil.hauge: pmc_approved? (naci.dai) neil.hauge: pmc_approved? (deboer) neil.hauge: pmc_approved? (neil.hauge) neil.hauge: pmc_approved? (kaloyan) neil.hauge: pmc_approved? (cbridgha) |
||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | PMC_approved | ||||||
| Attachments: |
|
||||||
|
Description
Neil Hauge
This is a major bug surrounding our validation of "virtual" mappings they are implied by the spec but not actually represented in source. This is a regression and has been worked on for a number of weeks. I am requesting PMC approval for this minor provisional API change. I'm fine with this, but its not clear what the change is, exactly. change in behavior? Change in arguments? return type? Is is a change from last release? Or just from previous milestone? (In reply to comment #2) Sorry...forgot to provide a link to the change details: http://dev.eclipse.org/mhonarc/lists/dali-dev/msg01159.html This change has been committed and will soon be released to head. Brian, please post a patch if possible for historical purposes. Created attachment 195369 [details]
patch 1a
This patch fixes a number of validation problems via the following changes:
- A rework of the Validator hierarchy, which is internal to Dali.
- Changes to all the Java clients of the Validators to pass in a persistent attribute. This allows a Validator to determine whether the mapping (etc.) is "virtual".
- Complete re-work of generators and queries, which don't fit the "virtual" model since they are not necessarily overridden by mapping file generators and queries.
- A couple of very minor public API changes were necessary so generator and query validation could be moved to the persistence unit:
- All the sub-interfaces of PersistentTypeContainer declared the method getPersistentType(String name) and it was necessary to move that method up to PersistentTypeContainer.
- MappingFileRoot did not extend PersistentTypeContainer and it should have. We did not notice this before since OrmXml, the *only* sub-interface of MappingFileRoot, extended PersistentTypeContainer and we were sloppily casting to OrmXml when necessary (instead of using MappingFileRoot directly).
|