File tree Expand file tree Collapse file tree
packages/metadata-protocol/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import type {
1212 ReferenceResolutionError ,
1313 SeedLoadResultParsed ,
1414 Seed ,
15+ EngineQueryOptions ,
1516} from '@objectstack/spec/data' ;
1617import { SeedLoaderConfigSchema , isMultiValueField , referenceTargetOf } from '@objectstack/spec/data' ;
1718import { SEED_WRITE_EXECUTION_CONTEXT } from '@objectstack/spec/kernel' ;
@@ -2914,12 +2915,13 @@ export class SeedLoaderService implements ISeedLoaderService {
29142915 */
29152916 private async isRowIdHeld ( objectName : string , id : string ) : Promise < boolean > {
29162917 try {
2917- const rows = await this . engine . find ( objectName , {
2918+ const probe : EngineQueryOptions = {
29182919 where : { id } ,
29192920 fields : [ 'id' ] ,
29202921 limit : 1 ,
29212922 context : { isSystem : true } ,
2922- } as any ) ;
2923+ } ;
2924+ const rows = await this . engine . find ( objectName , probe ) ;
29232925 return Array . isArray ( rows ) && rows . length > 0 ;
29242926 } catch ( error ) {
29252927 if ( ! isMissingTableError ( error , objectName ) ) throw error ;
You can’t perform that action at this time.
0 commit comments