@@ -123,7 +123,7 @@ export class CommonDao<BM extends BaseDBEntity, DBM extends BaseDBEntity = BM, I
123
123
const table = opt . table || this . cfg . table
124
124
const started = this . logStarted ( op , table )
125
125
126
- let dbm = ( await ( opt . tx || this . cfg . db ) . getByIds < DBM > ( table , [ id as string ] ) ) [ 0 ]
126
+ let dbm = ( await ( opt . tx || this . cfg . db ) . getByIds < DBM > ( table , [ id as string ] , opt ) ) [ 0 ]
127
127
if ( dbm && this . cfg . hooks ! . afterLoad ) {
128
128
dbm = ( await this . cfg . hooks ! . afterLoad ( dbm ) ) || undefined
129
129
}
@@ -147,7 +147,7 @@ export class CommonDao<BM extends BaseDBEntity, DBM extends BaseDBEntity = BM, I
147
147
const op = `getByIdAsDBM(${ id } )`
148
148
const table = opt . table || this . cfg . table
149
149
const started = this . logStarted ( op , table )
150
- let [ dbm ] = await ( opt . tx || this . cfg . db ) . getByIds < DBM > ( table , [ id as string ] )
150
+ let [ dbm ] = await ( opt . tx || this . cfg . db ) . getByIds < DBM > ( table , [ id as string ] , opt )
151
151
if ( dbm && this . cfg . hooks ! . afterLoad ) {
152
152
dbm = ( await this . cfg . hooks ! . afterLoad ( dbm ) ) || undefined
153
153
}
@@ -162,7 +162,7 @@ export class CommonDao<BM extends BaseDBEntity, DBM extends BaseDBEntity = BM, I
162
162
const op = `getByIds ${ ids . length } id(s) (${ _truncate ( ids . slice ( 0 , 10 ) . join ( ', ' ) , 50 ) } )`
163
163
const table = opt . table || this . cfg . table
164
164
const started = this . logStarted ( op , table )
165
- let dbms = await ( opt . tx || this . cfg . db ) . getByIds < DBM > ( table , ids as string [ ] )
165
+ let dbms = await ( opt . tx || this . cfg . db ) . getByIds < DBM > ( table , ids as string [ ] , opt )
166
166
if ( this . cfg . hooks ! . afterLoad && dbms . length ) {
167
167
dbms = ( await pMap ( dbms , async dbm => await this . cfg . hooks ! . afterLoad ! ( dbm ) ) ) . filter (
168
168
_isTruthy ,
@@ -179,7 +179,7 @@ export class CommonDao<BM extends BaseDBEntity, DBM extends BaseDBEntity = BM, I
179
179
const op = `getByIdsAsDBM ${ ids . length } id(s) (${ _truncate ( ids . slice ( 0 , 10 ) . join ( ', ' ) , 50 ) } )`
180
180
const table = opt . table || this . cfg . table
181
181
const started = this . logStarted ( op , table )
182
- let dbms = await ( opt . tx || this . cfg . db ) . getByIds < DBM > ( table , ids as string [ ] )
182
+ let dbms = await ( opt . tx || this . cfg . db ) . getByIds < DBM > ( table , ids as string [ ] , opt )
183
183
if ( this . cfg . hooks ! . afterLoad && dbms . length ) {
184
184
dbms = ( await pMap ( dbms , async dbm => await this . cfg . hooks ! . afterLoad ! ( dbm ) ) ) . filter (
185
185
_isTruthy ,
0 commit comments