mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-15 12:01:33 +00:00
Fix lookups (#8156)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
4fbd758f84
commit
c5eb0ecd8b
@ -1030,7 +1030,7 @@ abstract class PostgresAdapterBase implements DbAdapter {
|
|||||||
const nested = Array.isArray(value) ? value[1] : undefined
|
const nested = Array.isArray(value) ? value[1] : undefined
|
||||||
const domain = translateDomain(this.hierarchy.getDomain(_class))
|
const domain = translateDomain(this.hierarchy.getDomain(_class))
|
||||||
const tkey = domain === DOMAIN_MODEL ? key : this.transformKey(baseDomain, clazz, key)
|
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({
|
res.push({
|
||||||
isReverse: false,
|
isReverse: false,
|
||||||
table: domain,
|
table: domain,
|
||||||
@ -1070,7 +1070,7 @@ abstract class PostgresAdapterBase implements DbAdapter {
|
|||||||
const desc = this.hierarchy
|
const desc = this.hierarchy
|
||||||
.getDescendants(this.hierarchy.getBaseClass(_class))
|
.getDescendants(this.hierarchy.getBaseClass(_class))
|
||||||
.filter((it) => !this.hierarchy.isMixin(it))
|
.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({
|
result.push({
|
||||||
isReverse: true,
|
isReverse: true,
|
||||||
table: domain,
|
table: domain,
|
||||||
|
Loading…
Reference in New Issue
Block a user