Skip to content

Overriden property not getting used #74

Description

@honzapatCZ

Hi
I am having a base type and a few derived types of it.

[Table("JournalEntryRefs")]
public abstract class JournalEntryRef
{
    [Projectable]
    public virtual string? DisplayName => null;
}

[Table("JournalEntryRefs")]
public class InvoiceJournalEntryRef : JournalEntryRef
{
    [Projectable]
    public override string? DisplayName => Invoice.Number != null ? Invoice.Number : "";
}

[Table("JournalEntryRefs")]
public class PaymentJournalEntryRef : JournalEntryRef
{
    [Projectable]
    public override string? DisplayName => Payment.Number;
}

When I query all the JournalEntryRef's(ie a collection somewhere) I specify that I want the reference column(beside others) and I'd expect that as such it would return the Invoice number for Invoice JournalEntryRef and Payment number for PaymentEntryRef. But currently they are always null.
Is that a bug? If so how can we fix it? Or is that entirely not possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem rightwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions