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
Post a Comment