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, I'm trying to extend LS generate class but getting an error message like this, Unknown column 'Mob.<MyExtendedProperty>k__BackingField' in 'field list'
public partial class Mob { public string MyExtendedProperty { get; set; } public void MyExtendedMethod() { } } Am I missing something? Thanks.
|
|
|
LightSpeed maps backing fields to the database automatically unless they are marked with the [Transient] attribute. There's no way to put that attribute onto an auto-property's generated field. You'll need to declare the private field the old-fashioned way:
public partial class Mob { [Transient]
private string _myExtendedProperty; public string MyExtendedProperty { get { return _myExtendedProperty; } set { _myExtendedProperty = value; } } public void MyExtendedMethod() { } }
|
|
|
Ah.. thanks for the info. I could not find the info easily on the documentation. BTW, the online documentation is really difficult to navigate. I wish that you provide off-line version in the form of chm. Thanks.
|
|
|
Well, having lots of custom propery, it's quite cumbersome. Since persistent properties are generated automatically, perhaps, the default behavior should be the other way around? If you don't add attributes, it should be transient property by default, no? Thanks.
|
|