Hibernate: subclass with foreign key as discriminator
posted 10 years ago
G'day to all!
I'm currently trying to implement some kind different kind of Lookup Values in one Table. So for instance a Currency, Country, Cities etc, etc all in one table. Looking something like this: id, code, description, type_id where type is an id pointing to a meta lookupvalue expressing the type like Currency, Country, City etc. I want to implement the various Lookup types as a subclass on the Master Lookup, I know I can discriminate on the value of the type, but it would be nice if I could discrimintate on the value inside the meta-lookup lookup type. something like