Hello all, I have banged my self with a very particular problem. Using OpenJPA (KODO 4.1) is there a way to use more than one column as a discriminator column?
My problem is that i have a table structure (which i have limited ability to modify of course) similar to this:
Table VEHICLE EXPENSIVE_CAR CHEAP_CAR EXPENSIVE_BOAT CHEAP_BOAT
---------------------------------------------------------------------------------
HORSE_POWER LUXURY_ACC CLASIFICATION SIZE SIZE
MEDIUM EXTRAS TV_SIZE
IS_EXPENSIVE CLASIFICATION
Where medium would discriminate between boat and car and is expensive would discriminate bettwen expensive or cheap.
So, is there any way to achieve this with the inheritance capabilities provided by OpenJPA (i know hibernate can use discriminator formulas but i am trying not to switch from the default JPA provider).
As a bonus if you can tell me about the custom discriminator strategies from OpenJPA that would be great since i have a hunch that it could be a plausible solution (even though i would prefer a vendor independent one)
Thanks a lot