This is a migrated thread and some comments may be shown as answers.

Virtual fields with FieldAlias attribute

3 Answers 55 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Pål
Top achievements
Rank 1
Pål asked on 11 Jan 2009, 06:25 PM
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

3 Answers, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 13 Jan 2009, 12:09 PM
Hi Pål,

This is a bug on our side. It is scheduled for fixing. As soon as we have more on the topic and it is resolved we can notify you. Thanks for the cooperation. Your Telerik points were updated.

Sincerely yours,
Alexander
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jan Blessenohl
Telerik team
answered on 14 Jan 2009, 04:06 PM
Hi Pål,
We have fixed your problem, the fix will be available in the next patch. We try to ship a new version this week or early next.

Greetings,
Jan Blessenohl
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Pål
Top achievements
Rank 1
answered on 14 Jan 2009, 04:08 PM
Thanks again. :-)

Pål
Tags
Development (API, general questions)
Asked by
Pål
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Jan Blessenohl
Telerik team
Pål
Top achievements
Rank 1
Share this question
or