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

Ef Derived Class concern #588

Open
R1Dev opened this issue Feb 28, 2024 Discussed in #587 · 2 comments
Open

Ef Derived Class concern #588

R1Dev opened this issue Feb 28, 2024 Discussed in #587 · 2 comments

Comments

@R1Dev
Copy link

R1Dev commented Feb 28, 2024

Discussed in #587

Originally posted by R1Dev February 28, 2024
Hello!
I added the classes to ef as herited classes like https://github.com/alexreich/RulesEngineEditor did.
When I Get the WorkflowData object, I get 2 Rules Properties and Rules Engine wants to have data in (RulesEngine) one

How to proceed to get a single propertie?

public class WorkflowData : RulesEngine.Models.Workflow
{
    public long Id { get; set; }
    public Guid TenantId { get; set; }
    public new IEnumerable<RuleData> Rules { get; set; }
    public new IEnumerable<ScopedParamData> GlobalParams { get; set; }
    public int Seq { get; set; }

}
Capture d'écran 2024-02-28 013537
@R1Dev
Copy link
Author

R1Dev commented Feb 29, 2024

If I remove
public new IEnumerable Rules { get; set; }
public new IEnumerable GlobalParams { get; set; }
I get following error in migration :
Unable to determine the relationship represented by navigation 'Rule.Actions' of type 'RuleActions'. Either manually configure the relationship, or ignore this property using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'.

@asulwer
Copy link

asulwer commented Jun 21, 2024

your workflow could contain multiple Rules and ChildRules. This is by default. in your example your Include will get all parent Rules in that workflow, ThenInclude gets all of the child rules for each parent rule. it does not go deeper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants