Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Contract inheritance breaks if the parent has an Id field #125

Open
stephanjohnson opened this issue Dec 27, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@stephanjohnson
Copy link

What happened?

I have the following Data Contract objects in my metadata:

image

The resulting code breaks because it ignores the Id attribute on the parent data contract.

public record TargetingCondition
{
    public TargetingCondition(Guid id, int priority)
    {
        Id = id;
        Priority = priority;
    }

    public Guid Id { get; init; }
    public int Priority { get; init; }
}
public record RandomRolloutTargetingCondition : TargetingCondition
{
    [IntentManaged(Mode.Ignore)]
    public RandomRolloutTargetingCondition(Guid id, int priority, decimal percentage) : base(priority)
    {
        Percentage = percentage;
    }

    public decimal Percentage { get; init; }
}

The above : base(priority) should be : base(id, priority).

What version of Intent Architect are you using?

4.4.0-beta.1

Additional information

No response

@stephanjohnson stephanjohnson added the bug Something isn't working label Dec 27, 2024
@joelsteventurner joelsteventurner self-assigned this Dec 27, 2024
@joelsteventurner
Copy link
Member

Thanks @stephanjohnson, we've logged this on our side to resolve as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants