fix association (#6108)

This commit is contained in:
Avinash Lingaloo 2022-03-31 17:32:27 +04:00 committed by GitHub
parent 567141a60e
commit 5a86c58ccb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -24,7 +24,7 @@ export default class PostsInChannelModel extends Model implements PostsInChannel
static associations: Associations = {
/** A CHANNEL can have multiple POSTS_IN_CHANNEL. (relationship is 1:N)*/
[CHANNEL]: {type: 'belongs_to', key: 'id'},
[CHANNEL]: {type: 'belongs_to', key: 'channel_id'},
};
/** channel_id: Associated channel identifier */

View file

@ -24,7 +24,7 @@ export default class PostsInThreadModel extends Model implements PostsInThreadMo
static associations: Associations = {
/** A POST can have a POSTS_IN_THREAD.(relationship is 1:1)*/
[POST]: {type: 'belongs_to', key: 'id'},
[POST]: {type: 'belongs_to', key: 'root_id'},
};
/** root_id: Associated root post identifier */