mongoid / origin

A Ruby DSL for building MongoDB queries
http://mongoid.org/en/origin/index.html
MIT License
62 stars 29 forks source link

Add Embedded Document Support to Aliasing #46

Open durran opened 12 years ago

durran commented 12 years ago

See mongoid/mongoid#2361

We can allow Origin to look at operations with a . in them, and check for aliases under a fully embedded tree... For example:

# In the provided aliases:
{ "addresses" => { "name" => "n" }}

# Then the query could alias "name" to "n":
queryable.where("addresses.name" => "Köpenicker Landstraße")