Steve Ebersole (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNDM3ZWE1NGQw...
) / New Feature (
https://hibernate.atlassian.net/browse/HHH-16383?atlOrigin=eyJpIjoiNDM3ZW...
) HHH-16383 (
https://hibernate.atlassian.net/browse/HHH-16383?atlOrigin=eyJpIjoiNDM3ZW...
) NaturalIdClass (
https://hibernate.atlassian.net/browse/HHH-16383?atlOrigin=eyJpIjoiNDM3ZW...
)
Change By: Steve Ebersole (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
Consider adding support for a {{NaturalIdClass}} akin to {{IdClass}}. This would allow
simplifying the load-by-natural-id API, removing the single/multi component. E.g.,
consider
{noformat}@Entity
@NaturalIdClass(CheckingAccountLocator.class)
class CheckingAccount {
@Id Integer id;
@NaturalId String routingNumber;
@NaturalId String accountNumber;
}{noformat}
At the moment, loading this by natural-id looks like:
{noformat}Session s = ...;
CheckingAccount acct = s.byNaturalId( CheckingAccount.class )
.using( "routingNumber",... "123" )
.using( "accountNumber",... "987" )
.load();{noformat}
The locator would allow that to look like:
{noformat}CheckingAccount acct = s.byNaturalId( CheckingAccount.class )
.load( new CheckingAccountLocator(... "123" ,... "987" ) );{noformat}
(
https://hibernate.atlassian.net/browse/HHH-16383#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16383#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100219- sha1:ac3e918 )