Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 360725

Summary: [Multi-Tenancy] Invalid validation message against mapped superclass
Product: [WebTools] Dali JPA Tools Reporter: Nan Li <nan.n.li>
Component: JPAAssignee: Karen Butzke <karenfbutzke>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: karenfbutzke
Version: unspecified   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows 7   
Whiteboard: EclipseLink

Description Nan Li CLA 2011-10-12 16:09:10 EDT
Build Identifier: M20110909-1335

Create a class hierarchy with the top a mapped superclass. When applying multi-tenancy annotations to the mapped superclass, the warning message - Multitenant metadata cannot be specified on non-root entities in a SINGLE_TABLE or JOINED inheritance hierarchy - is given which is incorrect. We should be able to apply multi-tenancy annotations to a mapped superclass. The use case likes 

@MappedSuperclass
@Multitenant(MultitenantType.SINGLE_TABLE)
@TenantDiscriminatorColumn(name="FOO_ID")
public class SuperFoo implements Serializable {
    ...
}

@Entity
public class Foo extends SuperFoo implements Serializable {
    ...
}

Reproducible: Always
Comment 1 Karen Butzke CLA 2011-10-12 16:48:41 EDT
fixed for M3