referencedColumnName attr?

Description

1. PrimaryKeyJoinColumn not support the referencedColumnName="<not id>" attr?

2. referencedColumnName="<not id>" can not work with FetchType.LAZY?

Environment

mysql 5.7

Activity

Show:
Gail Badner
April 9, 2019, 1:27 AM

Please attach a runnable test case for 1). You can find test templates at https://github.com/hibernate/hibernate-test-case-templates.

Regarding 2), this is a known issue when not using bytecode instrumentation. HibernateProxy requires the actual ID. When an association references a non-ID column, there is no way to determine the association's ID without joining with the associated table.

When bytecode instrumentation is used, 2) should not be an issue.

Assignee

Unassigned

Reporter

t _ liang

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Feedback Requested

2019/04/09

Feedback Requested By

Gail Badner

Components

Affects versions

Priority

Major
Configure