fixing tests

This commit is contained in:
Kononnable 2018-12-23 20:46:00 +01:00
parent f66ee271b5
commit 1eacddf6bb
2 changed files with 14 additions and 22 deletions

View File

@ -1,25 +1,11 @@
import {
BaseEntity,
Column,
Entity,
Index,
JoinColumn,
JoinTable,
ManyToMany,
ManyToOne,
OneToMany,
OneToOne,
PrimaryColumn,
PrimaryGeneratedColumn,
RelationId
} from "typeorm";
import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";
{{relationImports}}{{#each UniqueImports}}import {{curly true}}{{toEntityName this}}{{curly false}} from "./{{toFileName this}}";
{{/each}}
@Entity("{{EntityName}}"{{#Schema}},{schema:"{{.}}"}{{/Schema}})
{{#Indexes}}{{^isPrimaryKey}}@Index("{{name}}",[{{#columns}}"{{toPropertyName name}}",{{/columns}}]{{#isUnique}},{unique:true}{{/isUnique}})
{{/isPrimaryKey}}{{/Indexes}}export class {{toEntityName EntityName}}{{#if IsActiveRecord}} extends BaseEntity{{/if}} {
{{/isPrimaryKey}}{{/Indexes}}export class {{toEntityName EntityName}}{{#IsActiveRecord}} extends BaseEntity{{/IsActiveRecord}} {
{{#Columns}}
{{^relations}}{{#isGenerated}} @PrimaryGeneratedColumn({

View File

@ -71,7 +71,8 @@ export async function createMSSQLModels(filesOrgPath: string, resultsPath: strin
lazy: false,
constructor: false,
namingStrategy,
relationIds: false
relationIds: false,
activeRecord: false
});
conn = await createConnection(connOpt)
@ -143,7 +144,8 @@ export async function createPostgresModels(filesOrgPath: string, resultsPath: st
lazy: false,
constructor: false,
namingStrategy,
relationIds: false
relationIds: false,
activeRecord: false
});
conn = await createConnection(connOpt)
@ -207,7 +209,8 @@ export async function createSQLiteModels(filesOrgPath: string, resultsPath: stri
lazy: false,
constructor: false,
namingStrategy,
relationIds: false
relationIds: false,
activeRecord: false
});
conn = await createConnection(connOpt)
@ -269,7 +272,8 @@ export async function createMysqlModels(filesOrgPath: string, resultsPath: strin
lazy: false,
constructor: false,
namingStrategy,
relationIds: false
relationIds: false,
activeRecord: false
});
return engine;
@ -323,7 +327,8 @@ export async function createMariaDBModels(filesOrgPath: string, resultsPath: str
lazy: false,
constructor: false,
namingStrategy,
relationIds: false
relationIds: false,
activeRecord: false
});
@ -380,7 +385,8 @@ export async function createOracleDBModels(filesOrgPath: string, resultsPath: st
lazy: false,
constructor: false,
namingStrategy,
relationIds: false
relationIds: false,
activeRecord: false
});
return engine;