jmix
jmix copied to clipboard
Dynamic Attributes don't work with the entity with IDENTITY id
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
- Create a project
- Create a TestEntity
- Add the Dynamic attributes add-on
- Add views for the entity and add the Dynamic Attribute
- Add a dinamic attribute to the created entity and its views
- Press the "New" button and fill in any value to the dynamic attribute
- Press "Save" button
Current Behavior
The error is occured
Expected Behavior
The created entity is saved.
Sample Project
The problem is with the following code
But
Take into account to check the dynamic attributes indexing with the Search add-on.