Skip to main content
- Since Expressions are an internal API, and JPQL and criteria are our primary API, this should be exposed in JPQL and criteria to be of use to our users.
- I would prefer "cast" to downcast, as it is the term generally used in Java. Also could be usable for interfaces or other usages than inheritance.
- I don't think it should use an outerjoin by default to join subclass tables. It should use what ever join was used to join the reference (if it was inner, then inner, if it was outer then outer). The cast should only be supported in the "from" clause in JPQL, not the where clause (as all join options are only supported in the from clause). Also avoid the double alias, it make no sense to have two aliases required for the same thing.
- i.e. "Select e from Employee e join e.address a cast(HomeAddress)", "Select e from Employee e left join e.address a cast(HomeAddress)"
- James.sutherland.oracle.com 09:06, 6 April 2010 (UTC)
- Our Informix outer join support is broken, wrong, and outdated and should be removed in general. Either ignore the Informix outerjoin code, or remove it. We already have a bug logged by users to remove this as it prevents outer join working on Informix, which has supported the standard SQL join syntax for quite some time.
- I would avoid adding additional state to InheritancePolicy. I should be possible to just dynamically add the join expressions as required when normalizing.
Table per class, interfaces
- We should support this for table per class and interfaces. Currently we don't support joining these, as we can't join in all of the distinct tables, but cast to one class would provide us a way to support this.