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

Removed challenge and submission ids from files #16

Open
wants to merge 2 commits into
base: check_responses
Choose a base branch
from

Conversation

gfzabarino
Copy link

  • Added lookupModel property in most controller calls to allow using a ManyToMany model.
  • Added tables creation and migration scripts.
  • Fixed swaggerTestHelper to allow definitions without a required setting.

@gfzabarino gfzabarino force-pushed the removeChallengeAndSubmissionIdsFromFiles branch from cbdd355 to 3c73d6e Compare November 7, 2014 22:05
@gfzabarino
Copy link
Author

Is this too messy?

…a ManyToMany model.

- Added tables creation and migration scripts.
- Fixed swaggerTestHelper to allow definitions without a required setting.
@gfzabarino gfzabarino force-pushed the removeChallengeAndSubmissionIdsFromFiles branch from 91e9dae to 5ac78a5 Compare November 7, 2014 22:12
@indytechcook
Copy link
Contributor

This is good and I'm gong to merge but I have a question.

Can you provide an example GET request to utilize the filter for the many to many?

@gfzabarino
Copy link
Author

Hmm I'm not sure I understand. Could you provide me an example (no code, just mention it) of where would you want to use filters? I'm not sure if you mean like filtering files themselves, or do something like getting partial request results such as the example you provide in the challenge forum.

* @param options the controller options
* @param req the request
* @param res the response
* @param next the next function in the chain
*/
function getAllEntities(model, referenceModels, options, req, res, next) {
function getAllEntities(model, referenceModels, lookupModel, options, req, res, next) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gfzabarino I'm looking for the use case of why lookupModel was added and how to use it.

…e removed when options {filtering: true} is set on the controller creation).

- Fixed issue about including models into a query.
@gfzabarino
Copy link
Author

@indytechcook I just fixed it to work. The idea is to have the where clause referencing a lookupModel table in the include object passed into the include key in the filters object:

{ where: size > 3, //(I don't recall exactly how this is expressed, but it doesn't matter for the example)
include: [{
model: lookupModel,
where: { challengeId: 123 },
required: true
}]
}

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

Successfully merging this pull request may close these issues.

2 participants