[
https://issues.jboss.org/browse/HIBERNATE-160?page=com.atlassian.jira.plu...
]
Steve Ramage commented on HIBERNATE-160:
----------------------------------------
This manifests as a very confusing bug in Spring Boot, the linked issue is a blocker, but
I just wasted an hour trying to figure out why the name attribute was being ignored.
Allow PhysicalNamingStrategy implementations to detect when a name is
implicit or explicit
------------------------------------------------------------------------------------------
Key: HIBERNATE-160
URL:
https://issues.jboss.org/browse/HIBERNATE-160
Project: Hibernate Integration
Issue Type: Feature Request
Reporter: Phillip Webb
Assignee: Steve Ebersole
Priority: Optional
It's possible for column names to be explicitly defined, for example:
{code:java}
@Column(name = "firstName")
private String firstName;
{code}
Or deduced implicitly from the name of the field:
{code:java}
@Column
private String firstName;
{code}
Both of these forms result in a call to {{PhysicalNamingStrategy}} with an {{Identifier}}
but it's not possible to tell if the identified is explicitly named or deduced (the
relevant code is
[
here|https://github.com/hibernate/hibernate-orm/blob/47382f69cc282a3df1bc...]
and
[
here|https://github.com/hibernate/hibernate-orm/blob/47382f69cc282a3df1bc...]).
It would be nice if the {{Identifier}} could include an additional field that tells us
where it came from. This would allow generic naming strategies to be developed that
back-off when a {{name}} attribute is defined by the user.
For more background on users that are asking for this see [this Spring Boot
issue|https://github.com/spring-projects/spring-boot/issues/2129].
--
This message was sent by Atlassian Jira
(v7.12.1#712002)