I have an application that maps views into an existing Hibernate schema that makes extensive use of single table inheritance with a discriminator-value in the CLASSNAME column. What makes my situation unusual is that I do not what to support all the subclasses (discriminator-value in the Hibernate mappings) in the data, just those of interest to the application.
The problem is that if the application encounters an unsupported discriminator-value, Hibernate throws a "org.hibernate.WrongClassException" because it cannot find a mapping with the required discriminator-value.
What I would like to do is to create subclass that Hibernate will use if the discriminator-value is unknown (instead of throwing an exception).
Is there a way to do this?
Thanks, Ed