我有一个客户,它与customerBudget实体有关联.CustomerEntityListener将创建customerBudget实体.
我收到以下错误:
IllegalStateException: During synchronization a new object was found through a relationship that was not marked cascade PERSIST: de.company.entity.Customer-c4775b5b-413b-0567-3612-e0860bca9300 [new,managed].
Run Code Online (Sandbox Code Playgroud)
onAfterInsert(Customer实体)中的代码
LoadContext<Customer> loadContext = LoadContext.create(Customer.class);
loadContext.setId(entity.getId());
Customer customer = dataManager.load(loadContext);
CustomerBudget customerBudget = new CustomerBudget();
customerBudget.setCustomer(customer);
CommitContext commitContext = new CommitContext(customerBudget);
dataManager.commit(commitContext);
Run Code Online (Sandbox Code Playgroud)
如何在EntityListener中创建和持久化Entites?
我想在欢迎/主页选项卡上显示一些统计信息和链接.如何固定标签或防止关闭?
这是一个很好的解决方案,还是应该使用主窗口作为"仪表板"?
我想打开一个链接并进行方法调用.
机会:我想调用一个控制器方法并链接一个网址.invoke方法创建历史记录条目.
机会:否则我可以使用linkbutton whitch调用方法.在这种情况下,如何从控制器方法打开链接?
我有一本书数据源.一本书有很多作者.该集合显示在book-edit-view的网格中.现在我想按作者姓名排序.在collectionDatasource属性中,我将sortable设置为true.我该怎么做?