We've just migrated to version 5 and occasionally get the following warning:
Query - >> Currently do not support adding restriction on discriminator for table=
mytableA f0 to class
MyClassB
where:
mytableA is the table used to store a hierarchy of classes with 'MyClassA' as the base class
MyClassB is a class that extends MyClassA
I've looked at the DN source code where this message is produced but I can't really understand what the meaning of this is and if it is severe or can be safely ignored.
I don't recall ever seeing this in DN 4.
We use integer discriminators.
The metadata for MyClassA:
<class name="MyClassA" detachable="true" persistence-modifier="persistence-capable" table="mytableA">
<datastore-identity column="MYCLASSA_ID" />
<inheritance strategy="new-table">
<discriminator strategy="value-map" indexed="true">
<column name="classid" jdbc-type="INTEGER" />
</discriminator>
</inheritance>
<version strategy="version-number" column="VERSION" />
...
</class>
MyClassB metadata:
<class name="MyClassB" detachable="true" persistence-modifier="persistence-capable">
<inheritance strategy="superclass-table">
<discriminator value="17300">
</discriminator>
</inheritance>
...
</class>