Comments (6)
Hello @NicoKno ,
I talked with my developer, and you are right. This is a scenario that is currently not yet supported with the new IncludeGraph
introduced in the v7.100.0.0
.
Our new IncludeGraph greatly improves the performance for self-hierarchy
but is still incompatible with custom mapping in this case. That's something we will try to support soon.
You can learn more about the new IncludeGraph
here: https://entityframework-extensions.net/v7-100-0-0-include-graph
LegacyIncludeGraph
You can use the LegacyIncludeGraph
option, which should work like the IncludeGraph
in the v5.1.21.
context.BulkInsert(list, options => {
options.LegacyIncludeGraph = true;
});
It will be a lot slower but at least will be compatible with self-hierarchy with custom mapping (at this time, commands were generated by EF Core).
Let me know if that solves your issue.
Best Regards,
Jon
from entityframework-extensions.
Hi Jon,
thats nice to hear. I can try and refactor my code to use LegacyIncludeGraph.
As we are interested to also use the new features. What is actually meant by self-hirachy and especially CustomMapping.
I don't remember setting up any column mapping of any kind. The only thing we do is using a ColumnPrimaryKeyExpression.
Would there be some way to simply deactivate CustomMapping so I can see where I use it?
Could you please elaborate?
from entityframework-extensions.
Hello @NicoKno ,
I will have a meeting with my employee who worked on this next Monday. So I will provide you soon a more accurate answer about it.
from entityframework-extensions.
Hello @NicoKno ,
Would there be some way to simply deactivate CustomMapping so I can see where I use it?
I forgot to mention that using the ColumnPrimaryKeyExpression
is considered "custom mapping" for us in this case. That is a point we will discuss about the challenge (if any) to support at least a custom key.
from entityframework-extensions.
I implemented LegacyIncludeGraph in my codebase and it works now. Thanks for the heads up.
from entityframework-extensions.
Hello @NicoKno ,
Just to let you know, starting with the v7.100.0.4, it's now possible to use the EF Core Bulk Insert to set custom key properties as long as you do not use the Foreign Key
such as BossID
in an Employee
table.
Best Regards,
Jon
from entityframework-extensions.
Related Issues (20)
- Invalid Cast. The update expression must be of type MemberInitExpression. HOT 3
- Bulk Operations for Postgres does not respect the PermanentTable setting HOT 2
- Avoid Prepared Statements for Bulk operations HOT 6
- WhereBulkContains throwing System.ArgumentNullException: 'Value cannot be null. (Parameter 'name')' HOT 15
- BulkUpdate and BulkMerge Do Not Apply Any Changes To The Table with Owned Entity HOT 1
- BulkSaveChanges results in Foreign Key Constraint Violation but SaveChanges works HOT 3
- BulkMerge is Causing Violation of PRIMARY KEY constraint HOT 1
- BulkInsert: System.IndexOutOfRangeException: 'There is no row at position 0.' HOT 4
- While inserting new record through BulkMerge it's not overriding default constraint value HOT 3
- The type initializer for 'Z.BulkOperations.LicenseManager' threw an exception HOT 13
- `PublicExtensions` static dictionaries are filling up HOT 4
- SQLite Invalid cast from 'System.String' to 'System.Guid' HOT 4
- IDbCommandInterceptor does not fire when using BulkInsert or BulkDelete HOT 2
- WhereBulkContains does not work when table inherit from another table HOT 1
- Feat: Conditional insert HOT 6
- EFcore 8 UpdateFromQuery generates invalid sql HOT 5
- Microsoft.Data.SqlClient is on a vulnerable version - security update HOT 1
- BulkInsert ignoring session context value set before insert HOT 6
- BulkInsert - ERROR_34 HOT 17
- Z.EntityFramework.Plus.EFCore - Official behavior on DataAnnotations ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from entityframework-extensions.