Updating an entity's type in TypeORM single table inheritance

512 views Asked by At

Is there any way to change an inheriting entity's type (in the DB) to a different entity type?

1

There are 1 answers

0
Ella On BEST ANSWER

Convert entity with uid from OldType to NewType:

await em.update(OldType, { uid: uid }, {[entityTypeColumnName]: 'NewType'})