Dapeng Liu (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNjAyODRhOGEy...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16941?atlOrigin=eyJpIjoiNjAyOD...
) HHH-16941 (
https://hibernate.atlassian.net/browse/HHH-16941?atlOrigin=eyJpIjoiNjAyOD...
) Component.cachedSelectables does not work with non primary key reference (
https://hibernate.atlassian.net/browse/HHH-16941?atlOrigin=eyJpIjoiNjAyOD...
)
Issue Type: Bug Affects Versions: 6.2.5 Assignee: Unassigned Created: 16/Jul/2023 14:47 PM
Priority: Major Reporter: Dapeng Liu (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
For non primary key reference
@JoinColumn(name = "xxx", referencedColumnName = "yyy")
BinderHelper. createSyntheticPropertyReference runs first in ToOneFkSecondPass.
doSecondPass which causes Component. cachedSelectables to be initialized.
Then followed by TableBinder.bindForeignKey in ToOneFkSecondPass. doSecondPass which adds
foreign columns in Component but without updating cachedSelectables
Thus, PersistentClass. validate fails due to outdated Component.cachedSelectables
(
https://hibernate.atlassian.net/browse/HHH-16941#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16941#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#100232- sha1:33a7c72 )