Skip to content

Commit

Permalink
refactor: change import to core pkg in generated entities (#743)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecklf committed Aug 13, 2020
1 parent 0474787 commit c7907db
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion packages/entity-generator/src/EntityGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class EntityGenerator {
async createEntity(table: DatabaseTable): Promise<void> {
const meta = table.getEntityDeclaration(this.namingStrategy, this.helper);
const entity = this.project.createSourceFile(meta.className + '.ts', writer => {
writer.writeLine(`import { Entity, PrimaryKey, Property, ManyToOne, OneToMany, OneToOne, ManyToMany, Cascade, Index, Unique } from 'mikro-orm';`);
writer.writeLine(`import { Entity, PrimaryKey, Property, ManyToOne, OneToMany, OneToOne, ManyToMany, Cascade, Index, Unique } from '@mikro-orm/core';`);
writer.blankLine();
writer.writeLine('@Entity()');

Expand Down

0 comments on commit c7907db

Please sign in to comment.