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

Bug 317723

Summary: Clarify semantics of exclude-default-mappings
Product: z_Archived Reporter: Shaun Smith <shaun.smith>
Component: EclipselinkAssignee: Project Inbox <eclipselink.documentation-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: guy.pelletier
Version: unspecifiedFlags: shaun.smith: documentation+
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
URL: http://wiki.eclipse.org/EclipseLink/Examples/JPA/EclipseLink-ORM.XML#.3Cexclude-default-mappings.2F.3E
Whiteboard:
Bug Depends on:    
Bug Blocks: 251548    

Description Shaun Smith CLA 2010-06-23 11:59:21 EDT
The semantics of exclude-default-mappings are not entirely explained.  Do defaults still apply for attributes that are mapped when exclude-default-mappings is specified.   For example, if a field is mapped as basic but no column is provided then is the column name defaulted or must it be explicitly provided? Dali support for exclude-default-mappings in Bug 251548 needs to correctly reflect the semantics.
Comment 1 Guy Pelletier CLA 2010-06-23 14:31:57 EDT
Exclude-default-mappings only applies to those fields and methods that do specify any annotations or xml whatsoever.

Example:

public String getName() {
}

public String setName() {
}

Would qualify as a default mapping since it respects all the characteristics of a persistent attribute (even though no annotations whatsoever are specified) and therefore is mapped.

As soon as you specify an annotaton or add it to xml it is no longer considered a default mapping and all JPA defaults (column name etc) apply.
Comment 2 Guy Pelletier CLA 2010-06-23 14:51:30 EDT
Sorry I meant

public void setName(String name) {
}
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:06:04 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink