昨天,今天,明天,每天的每天,你是否都多懂得一点点...

星期四, 三月 01, 2018

A wield mongodb serialization issue caused by hidden property

This line throw exception.


Here is the exception detail



The problem is caused by 


The reason to use the new keyword is to hide the Name property in the base calss which has a required attribute. The new keyword will override the require attribute so that Name will not be validated.

The name in base class is hidden, but when mongo does serialization, it will found two names, so it causes the problem. The error message is confusing anyway. It's nothing to do with Id.


--
Feng

没有评论:

其它博客地址

此博客的同步博客地址: http://fengnz.wordpress.com
这里进入我的MSN SPACE.