Skip to content

don't execute n1ql request with key params at nil  #43

@giallon

Description

@giallon

If we have Mission class

class Mission
   n1ql: by_route, emit_key: route_id
end

and we call by_route with key params at nil

Mission.by_route(key: nil).last

then this method will build this request N1QL : SELECT raw meta().id FROM default WHERE type=“mission“ ORDER BY route_id asc,meta().id asc

It's very dangerous. Request N1QL is used by association (has_many)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions