jmix
jmix copied to clipboard
Lazy loading ignores referencedColumnName attribute
Environment
Jmix version: 2.6.1
Bug Description
When an association references a column other than id
@NotNull
@JoinColumn(name = "CODE", referencedColumnName = "CODE", nullable = false)
@ManyToOne(fetch = FetchType.LAZY, optional = false)
private Type type;
An error occurs during lazy loading of this property.
Steps To Reproduce
- Open the sample project
- Run the application
- Create a
TypeinApplication -> Types - Create a
Sub typeinApplication -> Sub types, selecting theTypefrom step 3 - Navigate to
Code testand clickTest lazy loading code
Current Behavior
Error when lazy loading
Expected Behavior
No error when lazy loading