hibernate-orm icon indicating copy to clipboard operation
hibernate-orm copied to clipboard

HHH-15216 Cannot change MetadataProvider implementation because JPAXMLOverriddenMetadataProvider is final and precisely expected by a cast operator

Open reda-alaoui opened this issue 3 years ago • 0 comments

This PR moves JPAXMLOverriddenMetadataProvider out of package internal and makes it non final.

reda-alaoui avatar Apr 18 '22 18:04 reda-alaoui

Hello?

reda-alaoui avatar Aug 30 '22 22:08 reda-alaoui

Please rebase the PR and make sure you annotate the classes which you move with @Internal.

beikov avatar Aug 31 '22 06:08 beikov

Thanks for your pull request!

This pull request appears to follow the contribution rules.

› This message was automatically generated.

Hello @beikov ,

Please rebase the PR and make sure you annotate the classes which you move with @Internal.

This is now done.

Can you explain why you had to move PropertyMappingElementCollector?

I wanted to avoid changing its visibility to public. But as you can see now, I reverted the move and changed its visibility to public.

reda-alaoui avatar Aug 31 '22 06:08 reda-alaoui

But as you can see now, I reverted the move and changed its visibility to public.

But why do you need this in the first place? The class is only used inside of JPAXMLOverriddenAnnotationReader and you can't interfere with the usage.

Also, there seem to be compilation errors

beikov avatar Aug 31 '22 06:08 beikov

But why do you need this in the first place? The class is only used inside of JPAXMLOverriddenAnnotationReader and you can't interfere with the usage.

I need to make it public because the class resides in package internal while I moved one of its consumer to the parent package. org.hibernate.cfg.annotations.reflection.JPAXMLOverriddenAnnotationReader can't access org.hibernate.cfg.annotations.reflection.internal.PropertyMappingElementCollector otherwise.

reda-alaoui avatar Aug 31 '22 06:08 reda-alaoui

The compilation failure should be now fixed.

reda-alaoui avatar Aug 31 '22 06:08 reda-alaoui

Thanks

beikov avatar Aug 31 '22 07:08 beikov

Thank you! Could this be back ported to 5.6.x?

reda-alaoui avatar Aug 31 '22 07:08 reda-alaoui

If you provide a PR for it, then yeah.

beikov avatar Aug 31 '22 07:08 beikov

Ok I will asap 👍

reda-alaoui avatar Aug 31 '22 07:08 reda-alaoui