Skip to content

simpleSort with useJavascriptSorting don't support dotNotation #921

Open
@Losses

Description

@Losses

Here's the implementation:

LokiJS/src/lokijs.js

Lines 3295 to 3301 in 25b9a33

if (options.useJavascriptSorting) {
return this.sort(function (obj1, obj2) {
if (obj1[propname] === obj2[propname]) return 0;
if (obj1[propname] > obj2[propname]) return 1;
if (obj1[propname] < obj2[propname]) return -1;
});
}

But the unit test is trying to use this feature here:

var results = coll.chain().find(
{ 'nested.count': { $in: [15, 73] } }
).simplesort('nested.count').data();

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