Bug 327110 - document EclipseLink less restrictive attribute name usage
Summary: document EclipseLink less restrictive attribute name usage
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-06 10:21 EDT by Chris Delahunt CLA
Modified: 2022-06-09 10:07 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Delahunt CLA 2010-10-06 10:21:21 EDT
307547 made some changes that now apply a feature EclipseLink always had to more places.  Unfortunately, this feature was never documented in the first place.  JPQL requires the use of property names in expressions.  EclipseLink has always accepted both the property name or a method name.  For instance "Select e from Employee e order by e.name", the order by clause accepts e.name, but EclipseLink would also accept "e.getName" and "e.Name".  Only using "e.name" is portable.  

307547 consolodated much of the attribute name processing through the same methods, so this feature is now used everywhere an attribute name can be specified.  For instance, when specifying the other side to a bidirecitonal relationship, the mappedby can now refer to the property name, the method name or the capitalized property name (ie on Employee, @OneToMany(mappedBy="manager") would work, as would @OneToMany(mappedBy="getManager") @OneToMany(mappedBy="Manager") )

Basically anywhere org.eclipse.persistence.internal.helper.Helper's getAttributeNameFromMethodName is used.
Comment 1 Eclipse Webmaster CLA 2022-06-09 10:07:49 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink