dont delete domainoptions if no new value is given
This commit is contained in:
parent
2171a5cf82
commit
3a386fb24e
@ -159,9 +159,9 @@ public class DomainModuleImpl extends AbstractModuleImpl {
|
||||
DomainOption.class.getAnnotation(javax.persistence.Entity.class).name() +
|
||||
" opt WHERE opt.name=:optName");
|
||||
Set<DomainOption> domainOptions = updatedDom.getDomainOptions();
|
||||
if (domainOptions == null) {
|
||||
updatedDom.setDomainOptions(oldDom.getDomainOptions());
|
||||
}
|
||||
// if (domainOptions == null) {
|
||||
// updatedDom.setDomainOptions(oldDom.getDomainOptions());
|
||||
// }
|
||||
for (DomainOption opt : domainOptions) {
|
||||
q.setParameter("optName", opt.getName());
|
||||
List<?> list = q.getResultList();
|
||||
|
@ -61,17 +61,17 @@ public class DomainRemote extends AbstractRemote {
|
||||
u.setName(user);
|
||||
dom.setUser(u);
|
||||
}
|
||||
Set<DomainOption> domainOptionsSet = new HashSet<DomainOption>();
|
||||
Object domOptsObj = setParams.get("domainoptions");
|
||||
if (domOptsObj != null && domOptsObj instanceof Object[]) {
|
||||
Set<DomainOption> domainOptionsSet = new HashSet<DomainOption>();
|
||||
Object[] domOptions = (Object[]) domOptsObj;
|
||||
for (int i=0; i<domOptions.length; i++) {
|
||||
DomainOption domainOption = new DomainOption();
|
||||
domainOption.setName((String)domOptions[i]);
|
||||
domainOptionsSet.add(domainOption);
|
||||
}
|
||||
dom.setDomainOptions(domainOptionsSet);
|
||||
}
|
||||
dom.setDomainOptions(domainOptionsSet);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user