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
|
Hi. Sometimes I receive this kind of exceptions: Mindscape.LightSpeed.LightSpeedException: Unable to use automatic property name detection for type 'Osted.Kernel.Database.XXXX' because multiple properties refer to field 'xxx'. Change all property setters to use the Set overload which takes a property name. I dont use the string literal in the setters. Ths exception is generated sometimes when I add a new property to the entities, sometimes read only properties. I dont understand the criteria tha LS uses to generate these exceptions. It seems a little erratic. A blog entry about this would be interesting to know how to proceed. |
|
|
We use (a version of) John Rusk's ingenious ActiveSharp library: http://www.codeplex.com/ActiveSharp As you've identified, ActiveSharp runs into trouble when multiple properties refer to the same field, e.g. private int? _size; In this case ActiveSharp does not know which property to raise PropertyChanged for when the _size field is set (because it can't identify a unique property that accesses the _size field). Therefore in this case we raise an exception to ask you, the developer, since you know the semantics of your model far better than ActiveSharp does, to specify in the setter which property is the one that needs to be cited in PropertyChanged. |
|
|
Hello Ivan, This code fails public int? Ojo
However I overrode GetOjoStr and GetOjoFullStr to accept nullables and the properties now are
and the error is gone. Nullables are generating much problems.
Thank you for the explanation. |
|
|
Hi Ivan I know understand the problem, I was thinking that the string parameter was the field name not the property name to raise the PropertyChanged event. Maybe you could raise this event for each property where the field modified is used, sometimes I must manually raise the event (however with no luck). |
|