fixed compiler errors

This commit is contained in:
Umed Khudoiberdiev 2016-03-08 01:48:00 +05:00
parent eca049873d
commit b9a6732d43
2 changed files with 4 additions and 4 deletions

View File

@ -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";

View File

@ -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