Updating sub-document: Expression Must Resolve to Top-Level Member

21 views
Skip to first unread message

reach4thelasers

unread,
Sep 20, 2011, 1:11:31 AM9/20/11
to NoRM mongodb
I want to update a single member of a sub-document I'm runing the
following Update:

session.Database.GetCollection<User>().Update(new { Username =
username }, h => h.SetValue(y => y.FacebookData.FacebookPermissions,
facebookPermissions), false, true);

It throws an Exception:

"Expression y=> y.FacebookData.FacebookPermissions Must resolve to
top level member"

Is this not possible or am I doing something wrong? How do I update a
single value of a sub-document?

reach4thelasers

unread,
Sep 20, 2011, 9:40:22 PM9/20/11
to NoRM mongodb
Its really difficult to get support for NoRM - so much so I'm
considering migrating to the 10gen driver. Is this group the best
place to ask questions? There are only 50 Stackoverflow questions
tagged with NoRM so it seems that this group has more activity, but
nobody answers any of the questions.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages