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

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -