I it possible to specify the discriminator value with sql query ?
I want to implement hibernate inheritace with table per class hirearchy for this i have to create a discriminator colum and the examples i saw all show a hard coded value , instead i want to get the discriminator value with a query is it possible?
mine is a workflow application , i start the workflow for several entities , i need a table which ,maps the workflow PK to entity PK , i can do this with multiple mapping tables but i want to have just one mapping table , for this i want to create a tbale called entity_type
(PK)Entity_type_id, (String)entiy_name
next i need a worklfow mapping table
(PK)worklfow_mapping _id,(FK)entity_type_id, (Number)entity_id
with this data model i want to achieve table per class hierarchy for workflow mapping table and here i need a query to get the entity_type_id the discriminator value I want to provide is select entity_type_id from entity_types where entity_name="Student"
|