mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-21 15:59:15 +00:00
Fix model order (#8250)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
e092c3ae80
commit
2c8f3c80bf
@ -1619,7 +1619,7 @@ class MongoTxAdapter extends MongoAdapterBase implements TxAdapter {
|
|||||||
@withContext('get-model')
|
@withContext('get-model')
|
||||||
async getModel (ctx: MeasureContext): Promise<Tx[]> {
|
async getModel (ctx: MeasureContext): Promise<Tx[]> {
|
||||||
const txCollection = this.db.collection<Tx>(DOMAIN_MODEL_TX)
|
const txCollection = this.db.collection<Tx>(DOMAIN_MODEL_TX)
|
||||||
const cursor = txCollection.find({}, { sort: { _id: 1, modifiedOn: 1 } })
|
const cursor = txCollection.find({}, { sort: { modifiedOn: 1, _id: 1 } })
|
||||||
const model = await toArray<Tx>(cursor)
|
const model = await toArray<Tx>(cursor)
|
||||||
// We need to put all core.account.System transactions first
|
// We need to put all core.account.System transactions first
|
||||||
const systemTx: Tx[] = []
|
const systemTx: Tx[] = []
|
||||||
|
@ -2093,7 +2093,7 @@ class PostgresTxAdapter extends PostgresAdapterBase implements TxAdapter {
|
|||||||
SELECT *
|
SELECT *
|
||||||
FROM "${translateDomain(DOMAIN_MODEL_TX)}"
|
FROM "${translateDomain(DOMAIN_MODEL_TX)}"
|
||||||
WHERE "workspaceId" = $1::uuid
|
WHERE "workspaceId" = $1::uuid
|
||||||
ORDER BY _id::text ASC, "modifiedOn"::bigint ASC
|
ORDER BY "modifiedOn"::bigint ASC, _id::text ASC
|
||||||
`
|
`
|
||||||
return client.execute(query, [this.workspaceId])
|
return client.execute(query, [this.workspaceId])
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user