This question is locked. New answers and comments are not allowed.
Hi.
I have a persistent class with a virtual persistent property like this:
public class Foo {
private bool m_IsFoobar;
[FieldAlias("m_IsFoobar")]
public virtual bool IsFoobar {
get {return m_IsFoobar;}
}
}
Works like a charm! But when I extend the class and override the property, something bad happens:
public class Bar {
public override IsFoobar {
get {return true;}
}
}
I get an exception on build telling me that the field alias I declared in "Foo" reffers to a field which cannot be found...
It seems it parses through the derived class and picks up the field attribute, but failes to recognise that it actually belongs to the base class, and so looks for m_IsFoobar field in the wrong class.
Any thoughts on this? Bug or feature?
Best regards
Pål Økern
I have a persistent class with a virtual persistent property like this:
public class Foo {
private bool m_IsFoobar;
[FieldAlias("m_IsFoobar")]
public virtual bool IsFoobar {
get {return m_IsFoobar;}
}
}
Works like a charm! But when I extend the class and override the property, something bad happens:
public class Bar {
public override IsFoobar {
get {return true;}
}
}
I get an exception on build telling me that the field alias I declared in "Foo" reffers to a field which cannot be found...
It seems it parses through the derived class and picks up the field attribute, but failes to recognise that it actually belongs to the base class, and so looks for m_IsFoobar field in the wrong class.
Any thoughts on this? Bug or feature?
Best regards
Pål Økern