| Summary: | [JPA 2.0] Incorrect validation/defaults when maps-id is used on a relationship | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Paul Fullbright <paul.fullbright> | ||||
| Component: | General | Assignee: | Paul Fullbright <paul.fullbright> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P2 | CC: | karenfbutzke, neil.hauge | ||||
| Version: | 2.3 | Flags: | neil.hauge:
pmc_approved?
(david_williams) neil.hauge: pmc_approved? (raghunathan.srinivasan) neil.hauge: pmc_approved? (naci.dai) neil.hauge: pmc_approved? (deboer) neil.hauge: pmc_approved+ neil.hauge: pmc_approved? (kaloyan) neil.hauge: review+ |
||||
| Target Milestone: | 2.3 M7 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows Vista | ||||||
| Whiteboard: | PMC_approved | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 294266, 294271 | ||||||
| Attachments: |
|
||||||
|
Description
Paul Fullbright
The fix for this requires the following API addition:
public interface OverrideContainer
extends JpaContextNode
{
interface Owner
{
...
Iterator<String> allOverridableNames();
...
}
}
and the following API interface extensions:
public interface AttributeOverride2_0
extends AttributeOverride
{
/**
* Property string associated with changes to the mapped by relationship
*/
final String MAPPED_BY_RELATIONSHIP_PROPERTY = "mappedByRelationship";
/**
* Return whether this attribute override is mapped by a relationship
* (i.e. a relationship maps this attribute override, possibly in an entity overriding
* an id or an embedded id overriding any attribute)
* N.B. - This might be several relationships (erroneously, of course)
*/
boolean isMappedByRelationship();
}
public interface EmbeddedIdMapping2_0
extends EmbeddedIdMapping
{
/**
* Property string associated with changes to the mapped by relationship
*/
final String MAPPED_BY_RELATIONSHIP_PROPERTY = "mappedByRelationship";
/**
* Return whether this id is mapped by a relationship (i.e. a relationship maps this embedded id)
* N.B. - This might be several relationships (erroneously, of course)
*/
boolean isMappedByRelationship();
}
public interface IdMapping2_0
extends IdMapping
{
/**
* Property string associated with changes to the mapped by relationship
*/
final String MAPPED_BY_RELATIONSHIP_PROPERTY = "mappedByRelationship";
/**
* Return whether this id is mapped by a relationship (i.e. a relationship maps this id)
* N.B. - This might be several relationships (erroneously, of course)
*/
boolean isMappedByRelationship();
}
It also requires UI changes in the form of uneditable checkboxes on id and embedded id mapping details pages to show the user whether the mapping has been mapped by a relationship (and so should therefore not specify any data information).
Created attachment 162793 [details]
proposed patch
Requesting PMC approval for provisional API changes and a small UI change. This is a bug and a blocking bug for a number of incorrect validation errors that are applied in this use case. It is a must fix for the release to avoid these incorrect validation errors. The provisional API changes have been detailed in comment 1 and notice has been posted to the mailing list - http://dev.eclipse.org/mhonarc/lists/dali-dev/msg00939.html. The UI change is noted at the bottom of comment 1. committed for M7 verified fixed in WTP build I-3.2.0-20100427043043 |