issue #22394: account for cases where relations are defined in orm extensions
Merge pull request #1197 from shackbarth/22394

issue #22394: account for cases where relations are defined in orm exts