mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
fixed compiler errors
This commit is contained in:
parent
eca049873d
commit
b9a6732d43
@ -87,7 +87,7 @@ TypeORM.createMysqlConnection(options, [Post, PostDetails, Image, ImageDetails,
|
||||
|
||||
return;
|
||||
|
||||
const postJson = {
|
||||
/*const postJson = {
|
||||
id: 1, // changed
|
||||
text: "This is post about hello", // changed
|
||||
title: "hello", // changed
|
||||
@ -162,7 +162,7 @@ TypeORM.createMysqlConnection(options, [Post, PostDetails, Image, ImageDetails,
|
||||
.getSingleResult()
|
||||
.then(post => console.log(post))
|
||||
// .then(result => console.log(JSON.stringify(result, null, 4)))
|
||||
.catch(error => console.log(error.stack ? error.stack : error));
|
||||
.catch(error => console.log(error.stack ? error.stack : error));*/
|
||||
|
||||
/*let details = new PostDetails();
|
||||
details.comment = "This is post about hello";
|
||||
|
||||
@ -22,14 +22,14 @@ export class Post {
|
||||
})
|
||||
text: string;
|
||||
|
||||
@OneToOne<PostDetails>(true, () => PostDetails, details => details.posts, {
|
||||
@OneToOne<PostDetails>(true, () => PostDetails, details => details.post, {
|
||||
cascadeInsert: true,
|
||||
cascadeUpdate: true,
|
||||
cascadeRemove: true
|
||||
})
|
||||
details: PostDetails;
|
||||
|
||||
@OneToMany<Image>(type => Image, image => image.posts, {
|
||||
@OneToMany<Image>(type => Image, image => image.post, {
|
||||
cascadeInsert: true,
|
||||
cascadeUpdate: true,
|
||||
cascadeRemove: true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user