Hi,
I am trying to generate a fragment of sql that would be used with createSQLQuery.
for example
Code:
select {subtype.*} from SUBTYPE subtypealias
inner join SUPERTYPE supertypealias on
subtypealias.pk = supertypealias.pk
where
"from SUBTYPE subtypealias
inner join SUPERTYPE supertypealias on
subtypealias.pk = supertypealias.pk"
is my string fragment.
Now the problem is that supertypealias is generated by hibernate, I tried to cheat by writing SUBTYPE_1_, but then the assumption is that hibernate will always generate the alias with tablename_1_.
If there is a way i can get the hibernate generated aliases then I don't need to hardcode the alias?
Any ideas?
thanks,