attach domain before setting reference to attached domainoption
This commit is contained in:
parent
5a46f47d37
commit
b44aab8d2d
@ -96,6 +96,7 @@ public class DomainModuleImpl extends AbstractModuleImpl {
|
|||||||
domainOption.setName("greylisting");
|
domainOption.setName("greylisting");
|
||||||
domainOptions.add(domainOption);
|
domainOptions.add(domainOption);
|
||||||
EntityManager em = getTransaction().getEntityManager();
|
EntityManager em = getTransaction().getEntityManager();
|
||||||
|
em.persist(dom);
|
||||||
Query q = em.createQuery("SELECT opt FROM " +
|
Query q = em.createQuery("SELECT opt FROM " +
|
||||||
DomainOption.class.getAnnotation(javax.persistence.Entity.class).name() +
|
DomainOption.class.getAnnotation(javax.persistence.Entity.class).name() +
|
||||||
" opt WHERE opt.name=:optName");
|
" opt WHERE opt.name=:optName");
|
||||||
|
Loading…
Reference in New Issue
Block a user