Skip to content

Association scopes Example #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
samanmohamadi opened this issue Aug 19, 2017 · 5 comments
Closed

Association scopes Example #103

samanmohamadi opened this issue Aug 19, 2017 · 5 comments

Comments

@samanmohamadi
Copy link

Is there any way to use association scopes with this great decorator ?

@RobinBuschmann
Copy link
Member

See the example from issue #45: #45 (comment)

Does this help?

@samanmohamadi
Copy link
Author

Yes, Thanks

@samanmohamadi
Copy link
Author

considering this:

Post.belongsToMany(Tag, {
  through: {
    model: ItemTag,
    unique: false,
    scope: {
      taggable: 'post'
    }
  },
  foreignKey: 'taggable_id',
  constraints: false
});

How should I define through Options ?
according to this interface I think it isn't possible, right ?

@samanmohamadi samanmohamadi reopened this Sep 1, 2017
@RobinBuschmann
Copy link
Member

You're right. This isn't supported yet. I will create an issue for that.

@RobinBuschmann
Copy link
Member

#122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants