I cannot figure out how to properly alias a discriminator column in native SQL.
For example, if this is my mapping:
Code:
...
<id name="userId" type="long" unsaved-value="undefined">
<column name="user_id" not-null="true"/>
</id>
<discriminator column="user_type" type="string"/>
...
How would I refer to the discriminator column in a native SQL statement? In other words, what goes where the question marks are below?
Code:
select
user_id {sm_ncmis_user_vw.userId},
'NCO' {???} -- this is the user_type (discriminator) column
from
sm_ncmis_user_vw