jmix icon indicating copy to clipboard operation
jmix copied to clipboard

Dynamic Attributes don't work with the entity with IDENTITY id

Open fractal3000 opened this issue 2 months ago • 2 comments

Environment

Jmix version: 2.7.1

Bug Description

There is an unexpected error when we use the dynamic attributes with the entity that has an it with the @GeneratedValue(strategy = GenerationType.IDENTITY) annotation.

Steps To Reproduce

  1. Create a project
  2. Create a TestEntity
  3. Add the Dynamic attributes add-on
  4. Add views for the entity and add the Dynamic Attribute
  5. Add a dinamic attribute to the created entity and its views
  6. Press the "New" button and fill in any value to the dynamic attribute
  7. Press "Save" button

Current Behavior

The error is occured

Image

Expected Behavior

The created entity is saved.

Sample Project

DynamicAttributesIdGenerationTest.zip

fractal3000 avatar Nov 14 '25 11:11 fractal3000

The problem is with the following code

Image Image

But

Image Image

fractal3000 avatar Nov 14 '25 11:11 fractal3000

Take into account to check the dynamic attributes indexing with the Search add-on.

fractal3000 avatar Dec 05 '25 12:12 fractal3000