diff --git a/test/integration/github-issues/135/entity/Post.ts b/test/integration/github-issues/135/entity/Post.ts index 16e94c3..b637582 100644 --- a/test/integration/github-issues/135/entity/Post.ts +++ b/test/integration/github-issues/135/entity/Post.ts @@ -22,15 +22,15 @@ import { PostCategory } from "./PostCategory"; export class Post { @Column("int", { primary: true, - name: "Id" + name: "id" }) - Id: number; + id: number; - @ManyToOne(type => PostAuthor, PostAuthor => PostAuthor.Id) + @ManyToOne(type => PostAuthor, PostAuthor => PostAuthor.id) @JoinColumn() postAuthor: PostAuthor; - @ManyToOne(type => PostCategory, PostCategory => PostCategory.Id) + @ManyToOne(type => PostCategory, PostCategory => PostCategory.id) @JoinColumn() postCategory: PostCategory; } diff --git a/test/integration/github-issues/135/entity/PostAuthor.ts b/test/integration/github-issues/135/entity/PostAuthor.ts index 5b8998f..0a649ae 100644 --- a/test/integration/github-issues/135/entity/PostAuthor.ts +++ b/test/integration/github-issues/135/entity/PostAuthor.ts @@ -17,10 +17,10 @@ import { Post } from "./Post"; export class PostAuthor { @Column("int", { primary: true, - name: "Id" + name: "id" }) - Id: number; + id: number; - @OneToMany(type => Post, Post => Post.Id) + @OneToMany(type => Post, Post => Post.id) posts: Post[]; } diff --git a/test/integration/github-issues/135/entity/PostCategory.ts b/test/integration/github-issues/135/entity/PostCategory.ts index 7d61e7e..675f571 100644 --- a/test/integration/github-issues/135/entity/PostCategory.ts +++ b/test/integration/github-issues/135/entity/PostCategory.ts @@ -17,10 +17,10 @@ import { Post } from "./Post"; export class PostCategory { @Column("int", { primary: true, - name: "Id" + name: "id" }) - Id: number; + id: number; - @OneToMany(type => Post, Post => Post.Id) + @OneToMany(type => Post, Post => Post.id) posts: Post[]; } diff --git a/test/integration/github-issues/65/entity/Post.ts b/test/integration/github-issues/65/entity/Post.ts index 2596c9e..af629a0 100644 --- a/test/integration/github-issues/65/entity/Post.ts +++ b/test/integration/github-issues/65/entity/Post.ts @@ -17,13 +17,13 @@ import { PostReader } from "./PostReader"; export class Post { @Column("int", { primary: true, - name: "Id" + name: "id" }) - Id: number; + id: number; - @OneToOne(type => PostAuthor, PostAuthor => PostAuthor.Id) + @OneToOne(type => PostAuthor, PostAuthor => PostAuthor.id) postAuthor: PostAuthor; - @OneToMany(type => PostReader, PostReader => PostReader.Id) + @OneToMany(type => PostReader, PostReader => PostReader.id) postReaders: PostReader[]; } diff --git a/test/integration/github-issues/65/entity/PostAuthor.ts b/test/integration/github-issues/65/entity/PostAuthor.ts index ab27fd7..fd16930 100644 --- a/test/integration/github-issues/65/entity/PostAuthor.ts +++ b/test/integration/github-issues/65/entity/PostAuthor.ts @@ -17,11 +17,11 @@ import { Post } from "./Post"; export class PostAuthor { @Column("int", { primary: true, - name: "Id" + name: "id" }) - Id: number; + id: number; - @OneToOne(type => Post, Post => Post.Id) + @OneToOne(type => Post, Post => Post.id) @JoinColumn() post: Post; diff --git a/test/integration/github-issues/65/entity/PostReader.ts b/test/integration/github-issues/65/entity/PostReader.ts index 864a73b..37a0462 100644 --- a/test/integration/github-issues/65/entity/PostReader.ts +++ b/test/integration/github-issues/65/entity/PostReader.ts @@ -17,11 +17,11 @@ import { Post } from "./Post"; export class PostReader { @Column("int", { primary: true, - name: "Id" + name: "id" }) - Id: number; + id: number; - @ManyToOne(type => Post, Post => Post.Id) + @ManyToOne(type => Post, Post => Post.id) @JoinColumn() post: Post; diff --git a/test/integration/github-issues/71/entity/Post.ts b/test/integration/github-issues/71/entity/Post.ts index 92b7eba..8c96706 100644 --- a/test/integration/github-issues/71/entity/Post.ts +++ b/test/integration/github-issues/71/entity/Post.ts @@ -20,26 +20,26 @@ export class Post { @Column("int", { // nullable: false, primary: true, - name: "Id" + name: "id" }) - Id: number; + id: number; - @OneToOne(type => PostAuthor, PostAuthor => PostAuthor.Id, { + @OneToOne(type => PostAuthor, PostAuthor => PostAuthor.id, { // onDelete: "CASCADE", // onUpdate: "CASCADE" }) postAuthor: PostAuthor; - @OneToOne(type => PostReader, PostReader => PostReader.Id) + @OneToOne(type => PostReader, PostReader => PostReader.id) postReader: PostReader; - @OneToOne(type => PostCategory, PostCategory => PostCategory.Id, { + @OneToOne(type => PostCategory, PostCategory => PostCategory.id, { // onDelete: "RESTRICT", // onUpdate: "RESTRICT" }) postCategory: PostCategory; - @OneToOne(type => PostDetails, PostDetails => PostDetails.Id, { + @OneToOne(type => PostDetails, PostDetails => PostDetails.id, { // onDelete: "SET NULL", // onUpdate: "SET NULL" }) diff --git a/test/integration/github-issues/71/entity/PostAuthor.ts b/test/integration/github-issues/71/entity/PostAuthor.ts index 18a2431..b9b01df 100644 --- a/test/integration/github-issues/71/entity/PostAuthor.ts +++ b/test/integration/github-issues/71/entity/PostAuthor.ts @@ -17,11 +17,11 @@ import { Post } from "./Post"; export class PostAuthor { @Column("int", { primary: true, - name: "Id" + name: "id" }) - Id: number; + id: number; - @OneToOne(type => Post, Post => Post.Id, { + @OneToOne(type => Post, Post => Post.id, { onDelete: "CASCADE" // onUpdate: "CASCADE" }) diff --git a/test/integration/github-issues/71/entity/PostCategory.ts b/test/integration/github-issues/71/entity/PostCategory.ts index 25f36fb..5aef2f3 100644 --- a/test/integration/github-issues/71/entity/PostCategory.ts +++ b/test/integration/github-issues/71/entity/PostCategory.ts @@ -17,11 +17,11 @@ import { Post } from "./Post"; export class PostCategory { @Column("int", { primary: true, - name: "Id" + name: "id" }) - Id: number; + id: number; - @OneToOne(type => Post, Post => Post.Id, { + @OneToOne(type => Post, Post => Post.id, { // onDelete: "RESTRICT", // onUpdate: "RESTRICT" }) diff --git a/test/integration/github-issues/71/entity/PostDetails.ts b/test/integration/github-issues/71/entity/PostDetails.ts index dc9d754..3feb93f 100644 --- a/test/integration/github-issues/71/entity/PostDetails.ts +++ b/test/integration/github-issues/71/entity/PostDetails.ts @@ -17,11 +17,11 @@ import { Post } from "./Post"; export class PostDetails { @Column("int", { primary: true, - name: "Id" + name: "id" }) - Id: number; + id: number; - @OneToOne(type => Post, Post => Post.Id, { + @OneToOne(type => Post, Post => Post.id, { onDelete: "SET NULL" // onUpdate: "SET NULL" }) diff --git a/test/integration/github-issues/71/entity/PostReader.ts b/test/integration/github-issues/71/entity/PostReader.ts index ef232be..86b1566 100644 --- a/test/integration/github-issues/71/entity/PostReader.ts +++ b/test/integration/github-issues/71/entity/PostReader.ts @@ -17,11 +17,11 @@ import { Post } from "./Post"; export class PostReader { @Column("int", { primary: true, - name: "Id" + name: "id" }) - Id: number; + id: number; - @OneToOne(type => Post, Post => Post.Id) + @OneToOne(type => Post, Post => Post.id) @JoinColumn() post: Post; } diff --git a/test/utils/EntityFileToJson.ts b/test/utils/EntityFileToJson.ts index a6f9229..b73df1f 100644 --- a/test/utils/EntityFileToJson.ts +++ b/test/utils/EntityFileToJson.ts @@ -499,15 +499,6 @@ export default class EntityFileToJson { console.log(`${trimmedLine}`); }); - retVal.columns = retVal.columns.map(col => { - if (col.columnName.endsWith("Id")) { - col.columnName = col.columnName.substr( - 0, - col.columnName.length - 2 - ); - } - return col; - }); retVal.indicies = retVal.indicies.map(ind => { ind.columnNames = ind.columnNames.map(colName => { if (colName.endsWith("Id")) {