Issue with unidirectional one-to-many association with a join column that references a column that is not the primary key

Description

A one-to-many association is causing Hibernate to throw:

when loading an entity via Session.get(domainClass, identifier), under the following conditions:

  • the association collection is annotated with @fetch(FetchMode.JOIN)

  • the association's join column is referencing a non-primary key of the owning entity

  • the association's join column value is referencing a non-existing record of the associated table (the "many" side).

Environment

None

Activity

Show:
Vlad Mihalcea
October 25, 2017, 2:16 PM

Applied PR upstream.

Fixed

Assignee

Vlad Mihalcea

Reporter

Vlad Mihalcea

Fix versions