This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I am using an external class as the base class for all my model classes. This class has an implemented Property, which is present in every db-table and every class. In the generated file this property is generated without the "override" keyword, which leads to an unwanted behaviour. How can I force the override keyword for these properties? I already tried to remove the property from the model-classes, which leads to the situation, that the property is not mapped anymore. Regards, Dennis |
|
|
If the property is implemented in the external base class, then you presumably don't need it to be implemented in the derived classes. So I am assuming you are only declaring the property in the designer entities so it can participate in database sync, is that right? If so you can set the property's Generation option to None -- it will then participate in database sync but no CLR property will be emitted. The base class property will still be mapped at run time provided that it is backed with a (non-transient) field of the same name, optionally prefixed with an underscore e.g. public class ExternalBase : Entity<int> { (LightSpeed mappings are always based on fields not properties, so you must declare the field; also, you must use the Set API in the setter rather than assigning the field directly.) |
|