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.