Skip to content

Commit 35bc916

Browse files
committed
Make sample compile with newest version
1 parent 47195fe commit 35bc916

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

sample/sample1-simple-usage/app.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ import {Post} from "./entity/Post";
66

77
useContainer(Container);
88
createConnection({
9-
driver: {
10-
type: "postgres",
11-
host: "localhost",
12-
port: 5432,
13-
username: "test",
14-
password: "admin",
15-
database: "test"
16-
},
9+
type: "postgres",
10+
host: "localhost",
11+
port: 5432,
12+
username: "test",
13+
password: "admin",
14+
database: "test",
1715
entities: [
1816
__dirname + "/entity/*.js"
1917
],

sample/sample1-simple-usage/entity/Post.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import {Table, PrimaryColumn, Column} from "typeorm";
1+
import {Entity, PrimaryGeneratedColumn, Column} from "typeorm";
22

3-
@Table()
3+
@Entity()
44
export class Post {
55

6-
@PrimaryColumn("int", { generated: true })
6+
@PrimaryGeneratedColumn()
77
id: number;
88

99
@Column()

0 commit comments

Comments
 (0)