johnh wrote:
I am using the Criteria query with Restrictions.sqlRestriction(). The "{alias}" is very handy, but it substitutes the name of the primary class. I need it to substitue the name of one of the superclasses. Is there some way to do this? Could it be changed to "{entity.property}" to refer to the property on the class or superclass?
I'm running into this issue, as well. In my case, I have a base abstract class with a bunch of joined-subclasses which extend it. The base abstract class defines a couple of common properties.
If I try to construct an sqlRestriction which uses one of the common properties of the base class, the use of {alias} fails, as it plugs in the table of the joined-subclass. I unfortunately need to use an sqlRestriction in this case, as I'm utilizing Oracle-specific functionality...
thanks