File tree Expand file tree Collapse file tree
src/repository/storage/postgres/orm/sequelize Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,16 +228,15 @@ export default class NoteRelationsSequelizeStorage {
228228 FROM ${ String ( this . database . literal ( this . tableName ) . val ) } nr
229229 INNER JOIN note_parents np ON np.parent_id = nr.note_id
230230 )
231- SELECT np.note_id, np.parent_id
231+ SELECT np.note_id AS "noteId" , np.parent_id AS "parentId"
232232 FROM note_parents np;` ;
233233
234- const result = await this . database . query ( query , {
234+ const result = await this . model . sequelize ? .query ( query , {
235235 replacements : { startNoteId : noteId } ,
236236 type : QueryTypes . SELECT ,
237237 } ) ;
238238
239- // eslint-disable-next-line @typescript-eslint/naming-convention
240- let noteParents = ( result as { note_id : number ; parent_id : number } [ ] ) ?. map ( note => note . parent_id ) ?? [ ] ;
239+ let noteParents = ( result as { noteId : number ; parentId : number } [ ] ) ?. map ( note => note . parentId ) ?? [ ] ;
241240
242241 noteParents . reverse ( ) ;
243242
You can’t perform that action at this time.
0 commit comments