Add-on not working in other project

Hello

I created an add-on and took the jar file from it and added it to another project. Now I extended the Template entity in the jar file to this project. Now I want to save it to database in ExtTemplate service.

@Transactional
public void create(@NotNull Div div) {
String template = div.getElement().toString();

     ExtTemplate extTemplate = metadata.create(ExtTemplate.class);

     extTemplate.setContent(template);

     entityManager.persist(extTemplate);
 }

All fields of ExtTemplate are complete, but when the persist method is executed at runtime, it throws an exception as follows:

Error Code: 0
Call: INSERT INTO EXT_TEMPLATE (ID, CONTENT) VALUES (?, ?)
bind => [null, null]

Even if I do it in DataManger, the situation is the same. Everything is done in the same way as creating an add-on in the jmix documentation.

Please answer this.

Is this a bug in jmix or am I wrong?

I haven’t found the answer yet

Hello, @asroryuldashev57

Could you please provide a simple project and add-on example and steps to reproduce the problem?
By doing so, I will be able to figure out what’s going on.

Regards,
Dmitry

GridStackProject.zip (968.8 KB)

Hello
There is an add-on jar file in the project

Is there a solution?

Hello, @asroryuldashev57

I do apologize for the late reply.

I’ve checked your project and it looks like it is known issue:
@MappedSuperclass entity enhanced incorrectly if it has no inheritors in the module where it is declared.

As a workaround, please try to add some inheritor (DummyExtTemplate entity without @MappedSuperclass) to the gridstackcomponent module.

Regards,
Dmitry