Venue.where(_.mayor eqs 1).select(_.legacyid).toString() must_== """db.venues.find({ "mayor" : 1}, { "legid" : 1})"""Mongo by default always returns id unless it's unselected. Is there any way to unselect a field, in particular an "_id" field?
--
You received this message because you are subscribed to the Google Groups "rogue-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rogue-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi guys,
I think it's doable so it got me thinking, if:
a) we want that feature (@jason?)
b) if we want it as .unselectId
or .unselect(_.id)
+ only available on an Selected
state of the query (should be doable AFAIR with the phantom types).
I think I like the second syntax better, even though it adds a bit more complexity... What do you think guys?
--
Konrad (PS: Yay, yosomite!)
I'm not sure how easy it's to make last line with illegal selectors not compile in Rogue. I never looked at how it's implemented but I'm very curious to see when I have time. :)
My 2 centsGeorge, that sounds good. In this case there is no way to unselect fields, and you are just selecting what you really want like in SQL. Maybe this is even more clear in terms of semantics.