Fix lookups (#8156)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2025-03-06 19:47:06 +05:00 committed by GitHub
parent 4fbd758f84
commit c5eb0ecd8b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1030,7 +1030,7 @@ abstract class PostgresAdapterBase implements DbAdapter {
const nested = Array.isArray(value) ? value[1] : undefined
const domain = translateDomain(this.hierarchy.getDomain(_class))
const tkey = domain === DOMAIN_MODEL ? key : this.transformKey(baseDomain, clazz, key)
const as = `lookup_${domain}_${parentKey !== undefined ? parentKey + '_lookup_' + key : key}`
const as = `lookup_${domain}_${parentKey !== undefined ? parentKey + '_lookup_' + key : key}`.toLowerCase()
res.push({
isReverse: false,
table: domain,
@ -1070,7 +1070,7 @@ abstract class PostgresAdapterBase implements DbAdapter {
const desc = this.hierarchy
.getDescendants(this.hierarchy.getBaseClass(_class))
.filter((it) => !this.hierarchy.isMixin(it))
const as = `reverse_lookup_${domain}_${parent !== undefined ? parent + '_lookup_' + key : key}`
const as = `reverse_lookup_${domain}_${parent !== undefined ? parent + '_lookup_' + key : key}`.toLowerCase()
result.push({
isReverse: true,
table: domain,