@@ -117,7 +117,7 @@ private void validateMaxAllow(final QualifiedName parentName,
117
117
true
118
118
);
119
119
120
- // Then check if the parent have configured max allowed on the db config
120
+ // Then check if the parent has a configured max allowed setting on the db config
121
121
if (maxAllow == null ) {
122
122
maxAllow = getMaxAllowedFromNestedMap (
123
123
parentName ,
@@ -127,7 +127,7 @@ private void validateMaxAllow(final QualifiedName parentName,
127
127
);
128
128
}
129
129
130
- // If not specified in maxAllowPerDBPerRelType,check the default max Allow based on relationType
130
+ // If not specified in maxAllowPerDBPerRelType,check the default maxAllow based on relationType
131
131
if (maxAllow == null ) {
132
132
final Integer count = props .getDefaultMaxAllowPerRelType ().get (type );
133
133
if (count != null ) {
@@ -140,7 +140,7 @@ private void validateMaxAllow(final QualifiedName parentName,
140
140
maxAllow = props .getMaxAllow ();
141
141
}
142
142
143
- // if maxAllow < 0, this means we can create as many child table under the parent
143
+ // if maxAllow < 0, this means we can create unlimited child tables under the parent
144
144
if (maxAllow < 0 ) {
145
145
return ;
146
146
}
@@ -164,15 +164,15 @@ private void validateCreate(final QualifiedName parentName,
164
164
if (!childParents .isEmpty ()) {
165
165
throw new ParentChildRelServiceException ("Cannot have a child table having more than one parent "
166
166
+ "- Child Table: " + childName
167
- + " already have a parent Table=" + childParents .stream ().findFirst ().get ());
167
+ + " already have a parent Table=" + childParents .stream ().findFirst ().get (). getName () );
168
168
}
169
169
170
170
// Validation to prevent creating a child table as a parent of another child table
171
171
final Set <ParentInfo > parentParents = getParents (parentName );
172
172
if (!parentParents .isEmpty ()) {
173
173
throw new ParentChildRelServiceException ("Cannot create a child table as parent "
174
174
+ "- parent table: " + parentName
175
- + " already have a parent table = " + parentParents .stream ().findFirst ().get ());
175
+ + " already have a parent table = " + parentParents .stream ().findFirst ().get (). getName () );
176
176
}
177
177
178
178
// Validation to prevent creating a parent on top of a table that have children
0 commit comments