persistence icon indicating copy to clipboard operation
persistence copied to clipboard

Multiple fetch joins for same attribute

Open beikov opened this issue 1 year ago • 1 comments

There is a TCK test that calls FetchParent#fetch for the same attribute multiple times, but with different join types.

Recently in Hibernate ORM, we decided to forbid this sort of nonsense by throwing an exception, but we are clearly failing the TCK now due to this one test. The specification does not say anything about whether this is allowed or disallowed, nor does it clarify what the result of such an operation should be. I assume that the TCK test is not trying to test this scenario, but was rather written this way for convenience.

Please clarify this behavior. I assume that the TCK test is simply wrong and hereby challenge it.

beikov avatar Mar 15 '24 10:03 beikov

Please clarify this behavior. I assume that the TCK test is simply wrong and hereby challenge it.

@lukasj could you please add the challenge label and if you agree that the test should be changed or excluded for Persistence 3.1, please accept the challenge. Please also indicate what you want the Platform TCK team to do (exclude or back port the https://github.com/jakartaee/platform-tck/pull/1259 change).

Thank you!

scottmarlow avatar Apr 03 '24 13:04 scottmarlow

@lukasj do you approve of this challenge for com/sun/ts/tests/jpa/core/criteriaapi/metamodelquery/Client.java#fetchTest ?

Please add the TCK challenge label and accept or reject if possible.

scottmarlow avatar Apr 26 '24 14:04 scottmarlow

@gavinking could you please add the challenge label to this issue. Thanks

scottmarlow avatar Apr 29 '24 17:04 scottmarlow

Thanks @lukasj, I'll go ahead and exclude com/sun/ts/tests/jpa/core/criteriaapi/metamodelquery/Client.java#fetchTest_from_standalone for this challenge. I'll release a new 3.1 JPA TCK with this exclude.

I'll see what the equivalent exclude is for the Platform TCK and make that change for when we soon release the EE 10 Platform TCK (we expect to release for Tags challenges soon).

scottmarlow avatar Apr 29 '24 17:04 scottmarlow

Addressed via https://github.com/jakartaee/platform-tck/pull/1294 which references the wrong issue number but has the correct changes so will stick with it so we can release the fix.

scottmarlow avatar Apr 30 '24 21:04 scottmarlow

This challenge can be closed as the updated TCK has been promoted.

scottmarlow avatar Jun 27 '24 15:06 scottmarlow

Excellent, thanks everyone!

gavinking avatar Jun 27 '24 15:06 gavinking