From: Robert Stam <rob...@10gen.com>
Date: Tue, 30 Oct 2012 12:40:24 -0400
Local: Tues, Oct 30 2012 12:40 pm
Subject: Re: [mongodb-csharp] Add override points for Query transformation and processing per object
You can do this already using a custom serializer. Here's a program
I've created a StringTable class that maps strings to ids and back, and a
This does mean that you can't completely initialize the class using
The LINQ implementation knows all about custom serializers, so by doing it
Let me know if you have any questions.
Robert
p.s. Note: the StringTable class in my sample program is not thread safe.
On Tue, Oct 30, 2012 at 12:03 PM, Ted Elliott <elliott....@gmail.com> wrote:
> Would it be possible to add some override points in the driver to do Linq > query transformation as well as some processing done on an object after its > deserialized but before its returned from the enumerator? Here is what we > are trying to accomplish, we have some fields where we've "compressed" some > strings to save space in the database. Basically we've taken a string, > stuck it in a lookup table to get back an int Id and the int gets stored in > the database. We would like to put that as close to the database as > possible to make it more automatic and not require the developer to think > about it too much. The object is modeled like this: > class Foo {
> [BsonElement("B")]
> So we want to do a few things here:
> We have 1 and 2 working, but we've had to wrap the MongoQueryProvider and
> So could something like this be added so that we have some places to
> Thanks,
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||