java - Single table per class hierarchy without discriminator column -


i have existing table without discriminator column , need map single table hierarchy, how map this? here table

vehicle ======== vehicle_id manufacturer load_capacity passenger_capacity 

i have 3 classes

vehicle.java vehicleid; manufacturer;  transportationvehicle.java loadcapacity;  passengervehicle.java passengercapacity; 

one way use @mappedsuperclass on vehicle class , map transportationvehicle , passengervehicle same table.

this way inherit mapped fields vehicle without having map entity.


Comments

Popular posts from this blog

xml - Extract substrings with XSLT -

math - "ELO Rating" and how does "TSR Rating" work? -

How can do a tuple comparison in coffeescript similar to that in python? -