|
One option, rather that wrapping, is to register the "treated FromElement" into the alias registry under its implicit/explicit alias (for use in expressions) but to not render it into the tree.
Another option is to piggy-back on Hibernate's notion of implicit downcasting in terms of expressions originating from the treated FromElement. So we'd still register the "treat target" with the FromElement, but just ignore it in expressions using the treated FromElement. This has a big drawback in terms of TREATs that occur in predicates.
Anyway, still a lot to think through...
|