Updating an entity's type in TypeORM single table inheritance

Viewed 121

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

1 Answers

Convert entity with uid from OldType to NewType:

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