Hello. Unfortunately, the DSL catalog API does not support inheritance for several reasons. In your message, for some reason, you only look at the declaration of the parent class fields,but do not look that the parent itself can also have Table annotations or something else, which creates a lot of additional problems that we specifically avoided.
Unfortunately, this API is not a full-fledged replacement for ORM in the general sense, so it is made as flat as possible. Perhaps in the future we will make full support for inheritance for this feature. In general, you can read the IEP of this feature for a complete picture [1] [1] https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=307136999 вс, 7 сент. 2025 г. в 14:07, Gianluca Bonetti <[email protected]>: > Hello > > I am experimenting with Apache Ignite 3 and working on creating tables > from annotated POJOs. > It appears that Apache Ignite 3 does not fully support class inheritance > when processing annotated POJOs. > > After some investigation, I traced the issue to the class > CreateFromAnnotationsImpl, processColumnsInPojo method, at line 199 in > Ignite 3.0 release, or line 204 in latest > https://github.com/apache/ignite-3/blob/main/modules/catalog-dsl/src/main/java/org/apache/ignite/internal/catalog/sql/CreateFromAnnotationsImpl.java > > private static void processColumnsInPojo(CreateTableImpl createTable, > Class<?> clazz, List<ColumnSorted> idColumns) { > for (Field f : clazz.getDeclaredFields()) { > if (Modifier.isStatic(f.getModifiers()) || > Modifier.isTransient(f.getModifiers())) { > continue; > } > ... > > By retrieving only the fields declared in the class (using > clazz.getDeclaredFields()) and not those inherited from a superclass (as > clazz.getFields() would do), inheritance support is effectively broken. > > Could someone please confirm whether inheritance is supposed to be fully > supported and this is a bug in the current implementation, or if the > intention is to only support class-declared fields and not inherited ones? > > I can provide a minimal reproducible set of source files, but the issue is > evident in class CreateFromAnnotationsImpl, so this is just to understand > whether it is designed to be so, or not. > > Thank you > Cheers > Gianluca Bonetti > -- best regards, Pochatkin Mikhail.
