我能够按照这里的说明配置 openshift 和 optaplanner 名册应用程序https://github.com/kiegroup/optashift-employee-rostering
我试图使用添加租户
curl -X POST "http://localhost/rest/tenant/add" -H "accept: application/json" -H "content-type: application/json" -d "{ \"id\": 100, \"version\": 10, \"name\": \"Test\"}"
我得到错误:
org.hibernate.PersistentObjectException: detached entity passed to persist: org.optaplanner.openshift.employeerostering.shared.tenant.Tenantorg.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1692)
org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1602)
org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1608)
org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1152)
org.jboss.as.jpa.container.AbstractEntityManager.persist(AbstractEntityManager.java:580)
org.optaplanner.openshift.employeerostering.server.tenant.TenantRestServiceImpl.addTenant(TenantRestServiceImpl.java:52)
org.optaplanner.openshift.employeerostering.server.tenant.TenantRestServiceImpl$Proxy$_$$_WeldSubclass.addTenant$$super(Unknown Source)
如何添加租户?