GitHunt
BE

beikov/jpa-treat-variations

Treat variations

:pass: image:https://rawgit.com/beikov/jpa-treat-variations/master/pass.svg[]
:fail: image:https://rawgit.com/beikov/jpa-treat-variations/master/fail.svg[]
:warn: image:https://rawgit.com/beikov/jpa-treat-variations/master/warn.svg[]

This is a collection of test cases for the treat operator.

It assumes some very specific behavior of the treat operator which might even differ from the JPA spec or intuition at first.
In addition to that, the following also tests for edge cases the JPA spec seemed to have forgotten to include.

There are 2 types of treat expressions

  • Root path treats e.g. TREAT(rootAlias AS Subtype)
  • Subpath treats e.g. TREAT(rootAlias.subpath AS Subtype)

Treat expressions can be used in different forms in different clauses

  • In SELECT/ON/WHERE/GROUP BY/HAVING/ORDER BY all types of treat expressions must be followed by a subpath e.g. TREAT(rootAlias AS Subtype).subpath
  • In FROM a treat expression must be one of the following
    • Subpath treat e.g. TREAT(rootAlias.subpath AS Subtype)
    • Subpath treat with root path treat e.g. TREAT(TREAT(rootAlias AS Subtype).subpath AS Subtype)
    • Root path treat followed by subpath e.g. TREAT(rootAlias AS Subtype).subpath

== Assumptions

A1. Dereferencing a collection is allowed and multiple dereferences result in the same join node. This is normally not allowed as per JPA spec 4.4.4.1 but most JPA providers allow it anyway.
If this assumption can't be fulfilled, the Association treat - SELECT tests for the following association types can be ignored

  • OneToManyList
  • OneToManyInverseSet
  • ManyToManyMapKey
  • ManyToManyMapValue

A2. Treats of relations do not cause filtering of the relation or skipping hierarchy joins. A treat of a relation gives access to the properties of a subtype. For other subtypes the treat will either produce NULL if used in an expression context, or make the embedding predicate produce FALSE if used in a condition context.
Treat joins may lead to a reduction of the joined tables, but only indirectly(see S3).

A3. Correlated relations do not alter the outer query. If a subquery implicitly joins a relation of a parent join alias via the means of JPA navigation,
the resulting join for that relation must not affect the results of the outer query. This can be achieved e.g. by creating the cross product of the subquery against the relation
and filtering the relation with the parent join alias. A query like SELECT (SELECT COUNT(e) FROM SomeEntity e WHERE e.key = o.association.key) FROM Supertype o
should be semantically equivalent to SELECT (SELECT COUNT(e) FROM o.association alias, SomeEntity e WHERE e.key = alias.key) FROM Supertype o

== Simplification translation strategy

S1. Nested treat expressions in non-FROM clauses can be implemented by replacing subexpressions with join nodes.
An expression like TREAT(TREAT(rootAlias AS Subtype).subpath AS Subtype).subpath will emmit INNER JOIN TREAT(rootAlias AS Subtype).subpath p
and the expression becomes TREAT(p AS Subtype).subpath

S2. Subpath treats in non-FROM clauses follow JPA navigation semantics and can be simplified by emmiting an inner join for the treated path
and replacing the path with the join alias e.g. TREAT(rootAlias.subpath AS Subtype).subpath will emmit INNER JOIN rootAlias.subpath p
and the expression becomes TREAT(p AS Subtype).subpath

S3. Since queries for types that have subtypes should produce concrete subtype values e.g. SELECT o FROM Supertype o returns [Subtype1, Subtype2, ...], subtype relations must be semantically left joined.
A treat join like LEFT JOIN TREAT(root.subpath Subtype) p can be simplified to LEFT JOIN root.subpath p ON TYPE(p) = Subtype and replacing every usage of p with TREAT(p AS Subtype)

S4. The join type for a relation join must semantically cascade for joining the type hierarchy of the relation,
meaning that e.g. LEFT JOIN TREAT(root.subpath Subtype) must use left join semantics not only for joining the subpath relation(might be collection table)
and the concrete subtype relation, but also for joining the supertype hierarchy relations.
The on clause predicates must be put on the appropriate relation joins on clauses so that the illusion of joining against a single table is kept(might require predicates to be transformed because ON KEY(...) = ... might get tricky)

S5. Due to this possible translation strategy the only new feature that needs deep implementation support is a root path treat.
When translating to SQL, the root path treat must be translated to the alias of the proper subtype relation.
When the root path treat is used in a condition context, the hosting predicate must be conjuncted with a type constraint.
This is especially necessary when predicates are negated or null-aware predicates are used like in TREAT(rootAlias AS Subtype).subpath IS NULL.
If the type constraint is missing, the subtype relation might also match non-subtypes. Therefore it should roughly translate to TYPE(rootAlias) = Subtype AND TREAT(rootAlias AS Subtype).subpath IS NULL.

== Possible optimizations

O1. The optimization of avoiding joins for subtype relations can actually be seen independent of treat support when applying the translation strategy.
When encountering a top-level equality- or in-predicate of the form TYPE(fromAlias) = Subtype or TYPE(fromAlias) IN (Subtype, Subtype2) in a WHERE or ON clause,
then the type hierarchy joins for the fromAlias relation can be reduced to only include the listed subtype relations.
Since the translation strategy mandates translating a treat join like JOIN TREAT(rootAlias.subpath AS Subtype) p to JOIN rootAlias.subpath p ON TYPE(p) = Subtype,
joining other subrelations can be avoided in this case.

O2. Another possible optimization is to avoid joins for super types if no super type properties are used.

O3. If it can be proven, that for top-level predicates of the form TREAT(root AS Subtype).subpath OPERATOR ... the predicate is always false for a subtype T1,
then the subtype mustn't be joined as instances of that type would be filtered out anyway.

In summary, treat joins can be reduced to normal joins with type restrictions and by replacing join aliases with the treated version.
Subpath treats can be replaced with root path treats by adding inner joins for paths. Treats in general do not cause subtype filtering,
only the type restrictions do.

== Attention

=== Access super type properties in subtype treated root path

Treating a root path as a subtype must always produce a value for instances that are a subtype and no value for other instance.
One might wrongly think that when accessing a property that is declared in the static type of a root path or one of it's super types, that the treat can be eliminated.
Instead the expression must produce a NULL value for instances that are not a subtype of the treated path.
The expression TREAT(rootAlias AS Subtype).supertypeProperty must be semantically treated like CASE WHEN TYPE(rootAlias) = Subtype THEN rootAlias.supertypeProperty END

=== Multiple distinct subtype relation joins

Having multiple implicit inner joins on different subtype like TREAT(alias AS Subtype).association will always result in an empty result set!
This is NOT because treat should result in something like TYPE(alias) = Subtype1 AND TYPE(alias) = Subtype2, but because the inner join condition can't be satisfied.

The following query

SELECT TREAT(alias AS Subtype1).subtype1Relation, TREAT(alias AS Subtype2).subtype2Relation FROM Supertype alias

can be simplified to

SELECT alias1, alias2 FROM Supertype alias JOIN TREAT(alias AS Subtype1).subtype1Relation alias1 JOIN TREAT(alias AS Subtype2).subtype2Relation alias2

Now it is clear that this can't produce any results because alias can't be both Subtype1 and Subtype2 at the same time, so one of the two inner joins will filter out the values.

=== Single table column sharing

Special care has to be taken when having multiple distinct subtypes that share common columns in a single table inheritance.
Since in that case a column could have a non-NULL value, an expression like TREAT(alias AS Subtype).subpath must be semantically treated like CASE WHEN TYPE(alias) = Subtype THEN TREAT(alias AS Subtype).subpath END.

=== Treated property returning case when with null-aware predicate

A construct like e.g. CASE WHEN ... THEN TREAT(alias AS Subtype).subpath END IS NULL, although not legal in JPQL might still be supported by a JPA provider.
Null-aware predicates must be embedded into the result expression of case-when expressions semantically to have the hosting predicate, in this case the IS NULL, evaluate to FALSE.
The result will be similar to CASE WHEN ... THEN TREAT(alias AS Subtype).subpath IS NULL END.

== Findings so far

EclipseLink

Hibernate

Datanucleus

== Test overview

The following should illustrate which test, tests which expression. Every test comes with a multiple counterpart to test a query with the expression with 2 different subtypes.

=== Root treat

|=======================================================================================================================
|Name |Expression
|SELECT |
| selectTreatedRootBasic: |TREAT(root).property
| selectTreatedParentRootBasic: |TREAT(parentRoot).property
| selectTreatedRootEmbeddableBasic: |TREAT(root).embeddable.property
| selectTreatedParentRootEmbeddableBasic: |TREAT(parentRoot).embeddable.property
|WHERE |
| whereTreatedRootBasic: |COALESCE(TREAT(root).property) OPERATOR ...
| whereTreatedRootEmbeddableBasic: |COALESCE(TREAT(root).embeddable.property) OPERATOR ...
| whereTreatedRootConditionBasic: |TREAT(root).property OPERATOR ...
| whereTreatedRootConditionEmbeddableBasic: |TREAT(root).embeddable.property OPERATOR ...
| whereTreatedRootConditionNegated: |NOT(TREAT(root).property OPERATOR ...)
| whereTreatedRootConditionSuperTypeAccess: |TREAT(root).superTypeProperty OPERATOR ...
|=======================================================================================================================

=== Association treat

Possible associations

  • ManyToOne
  • OneToManyList
  • OneToManyInverseSet
  • ManyToManyMapKey e.g. KEY(association)
  • ManyToManyMapValue e.g. VALUE(association) or simply association

|====================================================================================================================================
|Name |Expression
|SELECT |
| selectTreated{Association}: |TREAT(root.association).property
| selectTreatedParent{Association}: |TREAT(parentRoot.association).property
| selectTreatedEmbeddable{Association}: |TREAT(root.embeddable.association).property
| selectTreatedParentEmbeddable{Association}: |TREAT(parentRoot.embeddable.association).property
| selectTreatedEmbeddable{Association}Embeddable: |TREAT(root.embeddable.association).embeddable.property
| selectTreatedParentEmbeddable{Association}Embeddable: |TREAT(parentRoot.embeddable.association).embeddable.property
| selectTreatedRoot{Association}: |TREAT(TREAT(root).association).property
| selectTreatedParentRoot{Association}: |TREAT(TREAT(parentRoot).association).property
| selectTreatedRootEmbeddable{Association}: |TREAT(TREAT(root).embeddable.association).property
| selectTreatedParentRootEmbeddable{Association}: |TREAT(TREAT(parentRoot).embeddable.association).property
| selectTreatedRootEmbeddable{Association}Embeddable: |TREAT(TREAT(root).embeddable.association).embeddable.property
| selectTreatedParentRootEmbeddable{Association}Embeddable: |TREAT(TREAT(parentRoot).embeddable.association).embeddable.property
|JOIN |
| treatJoin{Association}: |TREAT(root.association)
| treatJoinParent{Association}: |TREAT(parentRoot.association)
| treatJoinEmbeddable{Association}: |TREAT(root.embeddable.association)
| treatJoinParentEmbeddable{Association}: |TREAT(parentRoot.embeddable.association)
| joinTreatedRoot{Association}: |TREAT(root).association
| joinTreatedParentRoot{Association}: |TREAT(parentRoot).association
| joinTreatedRootEmbeddable{Association}: |TREAT(root).embeddable.association
| joinTreatedParentRootEmbeddable{Association}: |TREAT(parentRoot).embeddable.association
| treatJoinTreatedRoot{Association}: |TREAT(TREAT(root).association)
| treatJoinTreatedParentRoot{Association}: |TREAT(TREAT(parentRoot).association)
| treatJoinTreatedRootEmbeddable{Association}: |TREAT(TREAT(root).embeddable.association)
| treatJoinTreatedParentRootEmbeddable{Association}: |TREAT(TREAT(parentRoot).embeddable.association)
|====================================================================================================================================

== Test results

=== EclipseLink results

Issues

  1. [[EL1]] treat with TABLE_PER_CLASS inheritance strategy is unsupported
  2. [[EL2]] filters when encounters treat: Filtering a relation should only be done when the treat is in the FROM clause or in predicates by adding a type constraint conjunction
  3. [[EL3]] treat of KEY not supported
  4. [[EL4]] dereference after treat leads to "cannot be resolved to a collection type" or "cannot be resolved to a valid type"
  5. [[EL5]] wrongly complains about "cast outside of an inheritance hierarchy"
  6. [[EL6]] constructs an SQL query that doesn't make sense
  7. [[EL7]] treat joining in the root of a subquery FROM clause leads to a parser error
  8. [[EL8]] extended join path not supported
  9. [[EL9]] left join semantics not properly propagated
  10. [[EL10]] treat as root in subquery FROM not supported
  11. [[EL11]] treat join of map value results in a NPE during SQL rendering
  12. [[EL12]] negation is not applied to type constraint of treat

==== Treat root

[cols=",^,^,^"]
|=================================================================================================================================================
|Name | Joined | SingleTable | TablePerClass
|SELECT | | |
| selectTreatedRootBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRootBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRootBasic |{fail} ^<>^ |{warn} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRootBasic |{fail} ^<>^ |{warn} ^<>^ |{fail} ^<>^
| selectTreatedRootEmbeddableBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRootEmbeddableBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRootEmbeddableBasic |{fail} ^<>^ |{warn} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRootEmbeddableBasic |{fail} ^<>^ |{warn} ^<>^ |{fail} ^<>^
|WHERE | | |
| whereTreatedRootBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| whereMultipleTreatedRootBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| whereTreatedRootEmbeddableBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| whereMultipleTreatedRootEmbeddableBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| whereTreatedRootConditionBasic |{pass} |{pass} |{fail} ^<>^
| whereMultipleTreatedRootConditionBasic |{pass} |{pass} |{fail} ^<>^
| whereTreatedRootConditionEmbeddableBasic |{pass} |{pass} |{fail} ^<>^
| whereMultipleTreatedRootConditionEmbeddableBasic |{pass} |{pass} |{fail} ^<>^
| whereTreatedRootConditionNegated |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| whereMultipleTreatedRootConditionNegated |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| whereTreatedRootConditionSuperTypeAccess |{pass} |{pass} |{fail} ^<>^
| whereMultipleTreatedRootConditionSuperTypeAccess |{pass} |{pass} |{fail} ^<>^
|=================================================================================================================================================

==== Association treat

===== Joined

[cols=",^,^,^,^,^"]
|=====================================================================================================================================================================================================
|Name | ManyToOne | OneToManyList | OneToManyInverseSet | ManyToManyMapKey | ManyToManyMapValue
|SELECT | | | | |
| selectTreated{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreated{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParent{Association} |{pass} |{pass} |{pass} |{fail} ^<>^ |{pass}
| selectMultipleTreatedParent{Association} |{fail} ^<>^ |{pass} |{pass} |{fail} ^<>^ |{pass}
| selectTreatedEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentEmbeddable{Association} |{pass} |{pass} |{pass} |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentEmbeddable{Association} |{fail} ^<>^ |{pass} |{pass} |{fail} ^<>^ |{fail} ^<>^
| selectTreatedEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentEmbeddable{Association}Embeddable |{pass} |{pass} |{pass} |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentEmbeddable{Association}Embeddable |{fail} ^<>^ |{pass} |{pass} |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRoot{Association} |{pass} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRoot{Association} |{pass} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRootEmbeddable{Association} |{pass} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRootEmbeddable{Association} |{pass} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRootEmbeddable{Association}Embeddable |{pass} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRootEmbeddable{Association}Embeddable |{pass} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
|JOIN | | | | |
| treatJoin{Association} |{pass} |{pass} |{pass} |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultiple{Association} |{pass} |{pass} |{pass} |{fail} ^<>^ |{fail} ^<>^
| treatJoinParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinEmbeddable{Association} |{pass} |{pass} |{pass} |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleEmbeddable{Association} |{pass} |{pass} |{pass} |{fail} ^<>^ |{fail} ^<>^
| treatJoinParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
|=====================================================================================================================================================================================================

===== SingleTable

[cols=",^,^,^,^,^"]
|=====================================================================================================================================================================================================
|Name | ManyToOne | OneToManyList | OneToManyInverseSet | ManyToManyMapKey | ManyToManyMapValue
|SELECT | | | | |
| selectTreated{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreated{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParent{Association} |{pass} |{pass} |{pass} |{fail} ^<>^ |{pass}
| selectMultipleTreatedParent{Association} |{fail} ^<>^ |{pass} |{pass} |{fail} ^<>^ |{pass}
| selectTreatedEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentEmbeddable{Association} |{pass} |{pass} |{pass} |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentEmbeddable{Association} |{fail} ^<>^ |{pass} |{pass} |{fail} ^<>^ |{fail} ^<>^
| selectTreatedEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentEmbeddable{Association}Embeddable |{pass} |{pass} |{pass} |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentEmbeddable{Association}Embeddable |{fail} ^<>^ |{pass} |{pass} |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRoot{Association} |{pass} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRoot{Association} |{pass} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRootEmbeddable{Association} |{pass} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRootEmbeddable{Association} |{pass} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRootEmbeddable{Association}Embeddable |{pass} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRootEmbeddable{Association}Embeddable |{pass} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
|JOIN | | | | |
| treatJoin{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultiple{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
|=====================================================================================================================================================================================================

===== TablePerClass

[cols=",^,^,^,^,^"]
|=====================================================================================================================================================================================================
|Name | ManyToOne | OneToManyList | OneToManyInverseSet | ManyToManyMapKey | ManyToManyMapValue
|SELECT | | | | |
| selectTreated{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreated{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
|JOIN | | | | |
| treatJoin{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultiple{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
|=====================================================================================================================================================================================================

The latest EclipseLink results

include::eclipselink-results.adoc[]

==== Hibernate results

Issues

  1. [[HH1]] treated paths not supported
  2. [[HH2]] subquery parsing error
  3. [[HH3]] treated embeddable parsing error
  4. [[HH4]] join type not cascading to superclass relation joins
  5. [[HH5]] joining treated roots not supported
  6. [[HH6]] treat of KEY not supported
  7. [[HH7]] joining just the last collection table instead of the union over all
  8. [[HH8]] filters when encounters treat: Filtering a relation should only be done when the treat is in the FROM clause or in predicates by adding a type constraint conjunction

==== Treat root

[cols=",^,^,^"]
|=================================================================================================================================================
|Name | Joined | SingleTable | TablePerClass
|SELECT | | |
| selectTreatedRootBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRootBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRootBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRootBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRootEmbeddableBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRootEmbeddableBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRootEmbeddableBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRootEmbeddableBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
|WHERE | | |
| whereTreatedRootBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| whereMultipleTreatedRootBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| whereTreatedRootEmbeddableBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| whereMultipleTreatedRootEmbeddableBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| whereTreatedRootConditionBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| whereMultipleTreatedRootConditionBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| whereTreatedRootConditionEmbeddableBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| whereMultipleTreatedRootConditionEmbeddableBasic |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| whereTreatedRootConditionNegated |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| whereMultipleTreatedRootConditionNegated |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| whereTreatedRootConditionSuperTypeAccess |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| whereMultipleTreatedRootConditionSuperTypeAccess |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
|=================================================================================================================================================

==== Association treat

===== Joined

[cols=",^,^,^,^,^"]
|=====================================================================================================================================================================================================
|Name | ManyToOne | OneToManyList | OneToManyInverseSet | ManyToManyMapKey | ManyToManyMapValue
|SELECT | | | | |
| selectTreated{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreated{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
|JOIN | | | | |
| treatJoin{Association} |{fail} ^<>^ |{pass} |{pass} |{fail} ^<>^ |{pass}
| treatJoinMultiple{Association} |{fail} ^<>^ |{pass} |{pass} |{fail} ^<>^ |{pass}
| treatJoinParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinEmbeddable{Association} |{fail} ^<>^ |{pass} |{pass} |{fail} ^<>^ |{pass}
| treatJoinMultipleEmbeddable{Association} |{fail} ^<>^ |{pass} |{pass} |{fail} ^<>^ |{pass}
| treatJoinParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
|=====================================================================================================================================================================================================

===== SingleTable

[cols=",^,^,^,^,^"]
|=====================================================================================================================================================================================================
|Name | ManyToOne | OneToManyList | OneToManyInverseSet | ManyToManyMapKey | ManyToManyMapValue
|SELECT | | | | |
| selectTreated{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreated{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
|JOIN | | | | |
| treatJoin{Association} |{pass} |{pass} |{pass} |{fail} ^<>^ |{pass}
| treatJoinMultiple{Association} |{pass} |{pass} |{pass} |{fail} ^<>^ |{pass}
| treatJoinParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinEmbeddable{Association} |{pass} |{pass} |{pass} |{fail} ^<>^ |{pass}
| treatJoinMultipleEmbeddable{Association} |{pass} |{pass} |{pass} |{fail} ^<>^ |{pass}
| treatJoinParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
|=====================================================================================================================================================================================================

===== TablePerClass

[cols=",^,^,^,^,^"]
|=====================================================================================================================================================================================================
|Name | ManyToOne | OneToManyList | OneToManyInverseSet | ManyToManyMapKey | ManyToManyMapValue
|SELECT | | | | |
| selectTreated{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreated{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectTreatedParentRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| selectMultipleTreatedParentRootEmbeddable{Association}Embeddable |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
|JOIN | | | | |
| treatJoin{Association} |{pass} |{fail} ^<>^ |{pass} |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultiple{Association} |{pass} |{fail} ^<>^ |{pass} |{fail} ^<>^ |{fail} ^<>^
| treatJoinParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleParent{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinEmbeddable{Association} |{pass} |{pass} |{pass} |{fail} ^<>^ |{pass}
| treatJoinMultipleEmbeddable{Association} |{pass} |{pass} |{pass} |{fail} ^<>^ |{pass}
| treatJoinParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleParentEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| joinMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedParentRoot{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
| treatJoinMultipleTreatedParentRootEmbeddable{Association} |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^ |{fail} ^<>^
|=====================================================================================================================================================================================================

The latest Hibernate results

include::hibernate-results.adoc[]

==== Datanucleus results

Datanucleus can't handle the entity mappings which is why it can't be tested.

// The latest Datanucleus results

// include::datanucleus-results.adoc[]

Languages

Java97.2%XSLT2.8%Shell0.0%

Contributors

Created August 4, 2016
Updated March 11, 2025