Giter VIP home page Giter VIP logo

Comments (6)

JonathanMagnan avatar JonathanMagnan commented on June 12, 2024

Hello @HenroOnline ,

I'm not fully sure to understand as it looks to be expected behavior.

You are using the ChangeTracker, so if you remove a folder, this is expected that the relationship is also removed but perharp I'm missing something as well.

If you think that's an issue, can you provide us a runnable project with the minimum code to reproduce it. That will be easier for us to understand the issue with a code that we can run. It doesnโ€™t need to be your project, just a new solution with the minimum code to reproduce the issue.

Your workaround looks indeed weird.

Best Regards,

Jon

from entityframework-classic.

HenroOnline avatar HenroOnline commented on June 12, 2024

I expected that when I delete a folder, the other properties would not be changed. Here are some screenshots from the data. The field ParentFolderId is now NULL.
Is there a way to detect these changes in relations?

Before delete
image

After delete
image

from entityframework-classic.

JonathanMagnan avatar JonathanMagnan commented on June 12, 2024

Hello @HenroOnline ,

Thank you, I think I understand now.

I will try it on my side.

Best Regards,

Jon

from entityframework-classic.

JonathanMagnan avatar JonathanMagnan commented on June 12, 2024

Hello @HenroOnline ,

We successfully reproduced the problem and made a fix.

We are currently testing our fix to determine if that's the best way to handle this scenario or not.

I will let you know more soon.

from entityframework-classic.

HenroOnline avatar HenroOnline commented on June 12, 2024

@JonathanMagnan Thanks for looking into it!

from entityframework-classic.

JonathanMagnan avatar JonathanMagnan commented on June 12, 2024

Hello @HenroOnline ,

Took us a lot of time but we finally succeed to release a new option for fixing this scenario.

When enabled the KeepRelationships options, the relation should not be removed anymore

context.Configuration.SoftDelete.KeepRelationships = true;

Let me know if everything is working as expected.

Best Regards,

Jon

from entityframework-classic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.