tkalkirill commented on code in PR #1312:
URL: https://github.com/apache/ignite-3/pull/1312#discussion_r1013687800


##########
modules/configuration/src/main/java/org/apache/ignite/internal/configuration/asm/ConfigurationAsmGenerator.java:
##########
@@ -1246,7 +1246,7 @@ private static void addNodeTraverseChildrenMethod(
             );
         } else if (!polymorphicFieldsByExtension.isEmpty()) {
             assert polymorphicTypeIdFieldDef != null : schemaClass.getName();
-            assert isPolymorphicId(schemaFields.get(0)) : 
schemaClass.getName();
+            assert 
schemaFields.stream().anyMatch(ConfigurationUtil::isPolymorphicId) : 
schemaClass.getName();

Review Comment:
   Please modify the documentation for 
`org.apache.ignite.configuration.annotation.PolymorphicConfig`.
   And also please add text to the assertion, for example: `"Missing field with 
@PolymorphicId in " + schemaClass.getName();`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to