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)
If we have
Missionclassand we call
by_routewith key params at nilthen this method will build this request N1QL :
SELECT raw meta().id FROM default WHERE type=“mission“ ORDER BY route_id asc,meta().id ascIt's very dangerous. Request N1QL is used by association (has_many)