Skip to content

Sorting associated items #196

@devpascoe

Description

@devpascoe

Do we have it? if so whats the syntax.

Additionally, i am creating my model's associations with column in the lookup table
eg.

db.Product.hasMany("additionalmedia", db.MediaItem, { order: Number }, {
    reverse : "additionalproducts"
});

I'd like to be able to sort by order.
Both

product.getAdditionalmedia('order', function (err, additionalImages) {

and

product.getAdditionalmedia({}, 'order', function (err, additionalImages) {

don't seem to have any effect.

Thanks :)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions