-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
HHH-18462 Provide alternatives to deprecated org.hibernate.engine.spiMapping #8843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| } | ||
|
|
||
| default Type getReferencedPropertyType(String className, String propertyName) throws MappingException{ | ||
| return getMappingMetamodel().getEntityDescriptor( className ).getPropertyType( propertyName ); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
| if ( subtype instanceof EntityType ) { | ||
| final EntityType entityType = (EntityType) subtype; | ||
| final Type idType = getIdType( entityType ); | ||
| columnSpan = idType.getColumnSpan( mapping ); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
| columnSpan = idType.getColumnSpan( mapping ); | ||
| } | ||
| else { | ||
| columnSpan = subtype.getColumnSpan( mapping ); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
| } | ||
|
|
||
| default Type getReferencedPropertyType(String className, String propertyName) throws MappingException { | ||
| return getMappingMetamodel().getEntityDescriptor( className ).getPropertyType( propertyName ); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
| public int[] getSqlTypeCodes(Mapping mapping) throws MappingException { | ||
| return join( discriminatorType.getSqlTypeCodes( mapping ), identifierType.getSqlTypeCodes( mapping ) ); | ||
| return join( | ||
| discriminatorType.getSqlTypeCodes( mapping ), |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
| return join( discriminatorType.getSqlTypeCodes( mapping ), identifierType.getSqlTypeCodes( mapping ) ); | ||
| return join( | ||
| discriminatorType.getSqlTypeCodes( mapping ), | ||
| identifierType.getSqlTypeCodes( mapping ) |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the approach. This cleans up a lot which is IMO a good thing to do for 7.0.
|
This is fine, but @dreab8 I wonder if it might be better to pass the
WDYT? |
|
(Note that |
|
@gavinking I may be wrong but i don't think it is possible, most of the time we need these information at runtime where we have no more access to the |
Nono, you're right and I'm wrong. Hrrm.... |
|
@dreab8 Alright, so how about this then:
The reason I suggest this design is:
|
|
I'd be curious if we still need access to the mapping information once we get rid of using |
|
@beikov most likely, yes |
|
@gavinking your suggestion is to move and rename |
Yeah.
That's the easiest thing, but if you don't like that option, I guess you should be able to easily change it so that it's |
|
Closed in favor of #8959 |
https://hibernate.atlassian.net/browse/HHH-18462
see comments
[Please describe here what your change is about]
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.