#5 -- Fix relation
All checks were successful
CI fuzzy controller / container-test-job (push) Successful in 59s
All checks were successful
CI fuzzy controller / container-test-job (push) Successful in 59s
This commit is contained in:
parent
9f3af7033e
commit
6918f52422
@ -26,7 +26,7 @@ public class Variable extends BaseEntity {
|
|||||||
private boolean input = true;
|
private boolean input = true;
|
||||||
|
|
||||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "variable_id", unique = true)
|
@JoinColumn(name = "variable_id")
|
||||||
private List<FuzzyTerm> fuzzyTerms = new ArrayList<>();
|
private List<FuzzyTerm> fuzzyTerms = new ArrayList<>();
|
||||||
|
|
||||||
public Variable() {
|
public Variable() {
|
||||||
|
@ -36,7 +36,9 @@ public class FuzzyTermService {
|
|||||||
term.setDescription(fuzzyTermForm.getDescription());
|
term.setDescription(fuzzyTermForm.getDescription());
|
||||||
term.setCrispValue(fuzzyTermForm.getCrispValue());
|
term.setCrispValue(fuzzyTermForm.getCrispValue());
|
||||||
FuzzyTerm ft = fuzzyTermRepository.save(term);
|
FuzzyTerm ft = fuzzyTermRepository.save(term);
|
||||||
variableService.addFuzzyTerm(fuzzyTermForm.getVariableId(), ft);
|
if (fuzzyTermForm.getId() == null || fuzzyTermForm.getId() == 0) {
|
||||||
|
variableService.addFuzzyTerm(fuzzyTermForm.getVariableId(), ft);
|
||||||
|
}
|
||||||
return ft;
|
return ft;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user