Skip to content

Commit

Permalink
preparing to validating required vs. optional values #162
Browse files Browse the repository at this point in the history
  • Loading branch information
abstratt committed Feb 16, 2019
1 parent 0fec6a3 commit 97c3447
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ public static <T extends TypedElement> boolean isCompatible(IBasicRepository rep
if (!destinationAsMultiple.isMultivalued() && sourceAsMultiple.isMultivalued())
// multi -> single is bad, single -> multi is ok
return false;
// TODO-RC Enable once we provide means to coerce optional values as required ones
// if (destinationAsMultiple.getLower() > 0 && sourceAsMultiple.getLower() == 0)
// // optional -> required is bad, required -> optional is ok
// return false;
}
return isCompatible(repository, source.getType(), destination.getType(), substitutions);
}
Expand Down

0 comments on commit 97c3447

Please sign in to comment.