Skip to content

Filtering/sorting by association fields #231

@gibonu

Description

@gibonu

hi is there any way to filter/sort by association fields?

I have a Project model with FK to User as project manager. I have turned on associations in sequelize and epilogue but now I want to be able to select all projects with project manager last name being XXXX.

It is achievable via sequelize so I assume it should be somehow possible with epilogue as well?
My resources are defined like that:

var resources = Object.keys(app.get('models'));
resources.pop();

resources.forEach(function (resource) {
var res = epilogue.resource({
model: app.get('models')[resource],
endpoints: ['/' + resource, '/' + resource + '/:id'],
associations: true,
});
});

where models are sequelize models

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions