Skip to content
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

support has many through on schema.yaml #145

Closed
endel opened this issue May 5, 2015 · 1 comment
Closed

support has many through on schema.yaml #145

endel opened this issue May 5, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@endel
Copy link
Contributor

endel commented May 5, 2015

No description provided.

@endel endel added the feature label May 5, 2015
@endel endel self-assigned this May 5, 2015
@endel endel added this to the 0.3.0 milestone May 5, 2015
@endel endel modified the milestones: 0.4.0, 0.3.0 Jun 17, 2015
@endel
Copy link
Contributor Author

endel commented Jul 15, 2015

Working example:

# 'books' collection
books:
 attributes:
   - name: name
     type: string

# 'book_authors' intermediary collection
book_authors:
  relationships:
    belongs_to:
      - books
      - authors

# 'authors' collection
authors:
  attributes:
    - name: name
      type: string

  relationships:
    has_many:
      - books:
          through: book_authors
          # collection: books  # defaults to 'books' collection
          # foreign_key: author_id # defaults to {related}_id (author_id)
          # far_key: # defaults to '{relation}_id' (book_id)
          # local_key: _id # defaults to _id
          # required: true # defaults to false, since our priority is to be as free as possible

@endel endel closed this as completed in 3d43f1c Jul 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant