Skip to content

Limit size in waterline and sails-orientdb #160

@nomi-ramzan

Description

@nomi-ramzan

Hi I am facing one problem with this adapter . If i am setting limit value -1 then it is setting zero to orient-bd. I also tried to debug this problem and here is my conclusion

When limit -1 is set then due to This and This line it is setting it to zero.
Now if it comes to orient side Orient is not taking it as valid limit as zero and giving this error

Invalid LIMIT value setted to ZERO. Use -1 to ignore the limit or use a positive number

And now if it comes to new waterline normalize criteria then it is setting a big number see This Section so final value can be Number.MAX_SAFE_INTEGER or 9007199254740991
But in this case orient db will not accept limit value greater then 2147483647 which is the max number which 32 bit number cab be.

So what can be the possible solutions ?

My development environment info
Waterline version: 0.12.2 and 0.13.0-rc9
Node version: 6.9.1
NPM version: 4.5.0
Orient db version: 2.1-rc6
Operating system: Windows 7 x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions