Discriminators and custom mapping

5 views
Skip to first unread message

Mattias Nordberg

unread,
Sep 13, 2011, 6:28:31 AM9/13/11
to NoRM mongodb
Hi,

I've run into two issues when working with types decorated with
MongoDiscriminatedAttribute in conjunction with custom mapping
configuration using MongoConfigurationMap.

1. If your discriminated base class has a configuration dictating the
collection name to use, it is ignored when you call GetCollection<T>.
It simply gets the name of the discriminated type and fails to check
for its configured collection name.

2. If that same custom configuration defines property aliases, they
are ignored when the subclass (in __type) is deserialized. It will try
to find a property with the name of the alias, which is incorrect.

I'm using version 0.9.8 (the one off nuget), so perhaps this has
already been fixed? I'm happy otherwise to give it a shot at
contributing a fix back of course.

Regards
Mattias
Reply all
Reply to author
Forward
0 new messages