London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
I believe I have discovered a bug with the Dynamic Data Store when using inheritance.
In the documentation it says that in order to save a property in the Dynamic Data Store, the property must be public and have a setter (which can be non-public). Properties without setters are ignored. For instance, in the following object, MyProperty will be added in the Dynamic Data Store but MyGetterProperty will not:
This is working as you would expect. However, consider this example where I instead implement MyGetterProperty in a abstract base class:
In this example, if I save an object of MyData to the Dynamic Data Store, MyGetterProperty now gets included in the database! When I try to read an object from the store I get an error in DereferencedPropertyBag.ToClonedObject saying that the property cannot be written because no setter was available. The error is that the getter property from the base class gets included in the Dynamic Data Store.
Am I correct in assuming that this is a bug? Is there a workaround to the problem or am I perhaps doing something wrong?