Search code examples
node.jsoraclenestjstypeorm

Can't use dot in table name with TypeORM and Oracle


I create entity


@Entity({ name: 'MYTABLE.TITLE' })
export class MyEntity {
  @PrimaryGeneratedColumn()
  id: number;

....
}

And when execute in my service

this.baseRepo.find()

in logs I have got some worst query, smth like this shit: SELECT "MyEntity".id ... FROM "MYTABLE"."NAME"

What is problem, why I haven't access to table with names separated with dot?


Solution

  • Just use @Entity({ name: 'TITLE', schema: 'MYTABLE' })