jmix icon indicating copy to clipboard operation
jmix copied to clipboard

Lazy loading ignores referencedColumnName attribute

Open OLODiman11 opened this issue 5 months ago • 0 comments

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

  1. Open the sample project
  2. Run the application
  3. Create a Type in Application -> Types
  4. Create a Sub type in Application -> Sub types, selecting the Type from step 3
  5. Navigate to Code test and click Test lazy loading code

Current Behavior

Error when lazy loading

Expected Behavior

No error when lazy loading

Sample Project

lazyloadingbug.zip

OLODiman11 avatar Sep 30 '25 13:09 OLODiman11