mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-07 03:38:16 +00:00
Fix resolving id columns for NativeQuery with inplicit joins and aliases
This commit is contained in:
parent
91cc3d8d51
commit
0fd83cf649
@ -345,9 +345,14 @@ public List<Fetch> visitFetches(FetchParent fetchParent) {
|
||||
relativePathStack.push( relativePath );
|
||||
}
|
||||
try {
|
||||
final FetchBuilder explicitFetchBuilder = fetchBuilderResolverStack
|
||||
String fullPath = relativePath.getFullPath();
|
||||
if ( fullPath.contains( EntityIdentifierMapping.ROLE_LOCAL_NAME ) ) {
|
||||
fullPath = fullPath.replace( EntityIdentifierMapping.ROLE_LOCAL_NAME + ".", "" );
|
||||
}
|
||||
FetchBuilder explicitFetchBuilder = fetchBuilderResolverStack
|
||||
.getCurrent()
|
||||
.apply( relativePath.getFullPath() );
|
||||
.apply( fullPath );
|
||||
|
||||
final FetchBuilder fetchBuilder;
|
||||
if ( explicitFetchBuilder != null ) {
|
||||
fetchBuilder = explicitFetchBuilder;
|
||||
|
Loading…
x
Reference in New Issue
Block a user