|
When using the pull request I see a problem when there is more than attribute node. The same columns with the same aliases are repeated in the select clause.
I've added a FailureExpected test to master and 4.3 branches that reproduces the original bug: org.hibernate.jpa.test.graphs.queryhint.QueryHintEntityGraphTest.testLoadGraphWithRestriction().
After applying the pull request commit, the resulting SQL is:
select company0_.id as id1_0_0_, location1_.id as id1_7_1_, company0_.location_id as location2_0_0_, markets2_.Company_id as Company_1_0_0__, markets2_.markets as markets2_2_0__, location1_.address as address2_7_1_, location1_.zip as zip3_7_1_, markets2_.Company_id as Company_1_0_0__, markets2_.markets as markets2_2_0__ from Company company0_ cross join Location location1_ left outer join Company_markets markets2_ on company0_.id=markets2_.Company_id where company0_.location_id=location1_.id and location1_.zip=? monospaced text
These are duplicated columns/aliases:
{{ markets2_.Company_id as Company_1_0_0__, markets2_.markets as markets2_2_0__ }}
I don't think the pull request causes this duplication, but it seems to expose some other bug. I need to investigate further.
|