Skip to content

Commit

Permalink
Merge pull request #487 from eurekao/master
Browse files Browse the repository at this point in the history
fix relation rModel invalid
  • Loading branch information
welefen committed Oct 31, 2016
2 parents 1e12e47 + 61af057 commit 6b2fac9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/model/relation.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ export default class extends think.model.base {
let model = mapOpts.model;
await model.getSchema();
let rfKey = mapOpts.rfKey || (model.getModelName().toLowerCase() + '_id');
let relationModel = this.getRelationModel(model);
let relationModel = mapOpts.rModel?this.model(mapOpts.rModel):this.getRelationModel(model);

let type = mapOpts.postType;
if (type === 'DELETE' || type === 'UPDATE') {
Expand Down

0 comments on commit 6b2fac9

Please sign in to comment.