-
-
Notifications
You must be signed in to change notification settings - Fork 611
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When using the generate-entities the emitted classes don't include the collection name on the entity.
Stack trace
(node:3691) UnhandledPromiseRejectionWarning: TableNotFoundException: select count(distinct("e0"."id")) as "count" from "f20181234" as "e0" - relation "f20181234" does not exist
To Reproduce
Steps to reproduce the behavior:
sql
CREATE TABLE f2018_1234(
id INT NOT NULL,
PRIMARY KEY (id)
)command
npx mikro-orm generate-entities --dumpgot
@Entity()
export class F20181234 {
@PrimaryKey()
id!: number;
}expected
@Entity({collection: 'f2018_1234'})
export class F20181234 {
@PrimaryKey()
id!: number;
}Expected behavior
Ideally the generated classes would map back to the tables in the source database.
Additional context
Not sure if I'm missing something with args or this is expected behavior
Versions
| Dependency | Version |
|---|---|
| node | 14.5.1 |
| typescript | 4.1.3 |
| mikro-orm | 4.3.4 |
| your-driver | postgres |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working