-
Notifications
You must be signed in to change notification settings - Fork 383
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
Deleting related entites without FK #97
Comments
Explicit Loading (commit, docs) is supported in EF 1.1.0-preview1. @kagamine I think we should up our build to support 1.1.0-preview1, since we will end up shipping Pomelo 1.1 once EF 1.1 is RTM. Lazy loading is still not supported. @Mats391 you should always use InnoDB unless you have a very good reason to be using MyISAM. There's plenty of articles out there that explain the differences, but InnoDB will be far more stable for you. |
Where is VS Tooling for .NET Core 1.1.0-prev1? |
Not sure about VS Tooling, I use JetBrains Project Rider. The 1.1.0-preview1 |
I can't get command line tooing to work (same as VS tooling I think). Looks like there's an open issue: I've got the upgrade to 1.1.0-preview1 WIP here: caleblloyd@0b5d1a6, once Microsoft fixes the tooling I will test it and open a PR |
@Mats391 explicit loading is working in our dotnet/efcore#795 will bring bulk Update / Delete whenever it is implemented. It looks like https://github.com/zzzprojects/EntityFramework-Plus may provide the extension methods that you need for Bulk Update / Delete, but I haven't tried it. |
I am currently working on a MyIsam database and found some unexpected behavior when cascade deleting. I could switch to InnoDb or another engine that supports FK for dealing with this natively on the database, but I actually do not want to care about the database too much while working with EF.
The issue
On a database engine that does not support FK (e.g. MyIsam) related entities that should cascade on delete only get deleted if you eager load them before.
Example:
This could be an issue with EF core and 1.1 might actually fix this as they say 1.1 will deal with more queries on the database instead of memory. With 1.1 it also looks like we will be able to easily load related entities without having to do a lot of includes.
All in all would be nice if this could be done on the database without explicitly having to eager load everything.
The text was updated successfully, but these errors were encountered: