Marco Belladelli (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=637b480...
) *commented* on HHH-16437 (
https://hibernate.atlassian.net/browse/HHH-16437?atlOrigin=eyJpIjoiYTc4Nj...
)
Re: class org.hibernate.mapping.BasicValue cannot be cast to class
org.hibernate.mapping.ToOne (
https://hibernate.atlassian.net/browse/HHH-16437?atlOrigin=eyJpIjoiYTc4Nj...
)
Hello Marius K (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
) , the error you’re seeing is triggered by a new check we introduced. The mappedBy member
of @OneToMany annotation is used to define bi-directional associations between 2 entity
types, with the entity which defines it being the non-owning (or inverse) side of the
association. You’re using it incorrectly, it doesn’t make sense to indicate a mappedBy
pointing to Integer property. Please refer to the User Guide (
https://docs.jboss.org/hibernate/orm/6.2/userguide/html_single/Hibernate_...
) for more information.
I think what you’re trying to do might indicating that the id.contractId property of
Entity Contractposition should be used as a join column, which case you should use some
like @JoinColumn(name="VERTRAG_ID").
(
https://hibernate.atlassian.net/browse/HHH-16437#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16437#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#100221- sha1:78e8bd6 )