Michael, thanks for the quick response.
So, I was successful with this command (with the _id field also
specified):
> db.foo.find({"key":"12345"}, {_id:1, array_field:{$slice:[0,1]}})
But this seems incredibly broken, since it's totally separate from any
other nested field access. It will mean I'll have to totally jerry-
rig my custom php ORM class to handle these special cases. Is this a
known problem with Mongo, and are they going to fix it?
On Sep 22, 12:11 pm, Michael Dirolf <
m...@10gen.com> wrote:
> I think there's some inconsistency there with how dot notation works
> for query documents and in a projection. In your case you should be
> able to use $slice to only get back certain indexes from an array.
>