Skip to content

Tags: PawelGerr/Thinktecture.EntityFrameworkCore

Tags

10.5.0

Toggle 10.5.0's commit message

Verified

This commit was signed with the committer’s verified signature.
PawelGerr Pawel Gerr
fix: resolve all bulk operation tables through IBulkOperationTableNam…

…eProvider (#76)

TableName and Schema of the bulk operation options redirected only the root table. Owned types that are mapped to separate tables were always written to the table from the EF Core model. SQL Server and SQLite wrote these rows silently into the wrong table, and PostgreSQL failed after the root rows were already written.

The new option TableNameProvider takes an IBulkOperationTableNameProvider and defaults to IBulkOperationTableNameProvider.Default. The provider returns a BulkOperationTableName for the root entity type and for every separately mapped owned entity type that is written, including nested owned types. Internal code receives one provider per operation and resolves every table through it when the table is written. No internal method takes a raw table name or schema. The library gives no atomicity guarantee: when the provider throws for an owned type, rows of the root table may already be written, and atomicity is the responsibility of the caller's transaction. IBulkOperationTableNameProvider.Default uses the tables from the EF Core model. IBulkOperationTableNameProvider.ForRootEntity sets the table of the root entity only and throws for owned types in separate tables. IBulkOperationTableNameProvider.Create builds a provider from a delegate. Internal temp tables always use ForRootEntity with the temp table name, so a provider of the caller never reaches them.

TableName and Schema on the bulk insert, update, upsert and query-based bulk operation options are obsolete and point to TableNameProvider. Setting them replaces TableNameProvider with a provider for the root entity, in which a null part keeps the value of the EF Core model. Setting TableNameProvider clears them, so the last assignment wins. The option classes delegate the three properties to the internal class BulkOperationTableNameOptions. A provider that is built from TableName and Schema redirects the root table only and throws when the operation reaches an owned type in a separate table. TableNameProvider is a default interface member on the option interfaces, which builds the same provider from TableName and Schema, so existing implementations keep working. The query-based options implement the new IBulkOperationFromQueryOptions.

SQLite bulk upsert rejects owned types in separate tables with a NotSupportedException before the first write. New tests verify the owned-type support of bulk update and upsert per provider, and the documentation states it per provider. The version is raised to 10.5.0.

10.5.0-beta01

Toggle 10.5.0-beta01's commit message

Verified

This commit was signed with the committer’s verified signature.
PawelGerr Pawel Gerr
fix: resolve all bulk operation tables through IBulkOperationTableNam…

…eProvider (#76)

TableName and Schema of the bulk operation options redirected only the root table. Owned types that are mapped to separate tables were always written to the table from the EF Core model. SQL Server and SQLite wrote these rows silently into the wrong table, and PostgreSQL failed after the root rows were already written.

The new option TableNameProvider takes an IBulkOperationTableNameProvider and defaults to IBulkOperationTableNameProvider.Default. The provider returns a BulkOperationTableName for the root entity type and for every separately mapped owned entity type that is written, including nested owned types. Internal code receives one provider per operation and resolves every table through it when the table is written. No internal method takes a raw table name or schema. The library gives no atomicity guarantee: when the provider throws for an owned type, rows of the root table may already be written, and atomicity is the responsibility of the caller's transaction. IBulkOperationTableNameProvider.Default uses the tables from the EF Core model. IBulkOperationTableNameProvider.ForRootEntity sets the table of the root entity only and throws for owned types in separate tables. IBulkOperationTableNameProvider.Create builds a provider from a delegate. Internal temp tables always use ForRootEntity with the temp table name, so a provider of the caller never reaches them.

TableName and Schema on the bulk insert, update, upsert and query-based bulk operation options are obsolete and point to TableNameProvider. Setting them replaces TableNameProvider with a provider for the root entity, in which a null part keeps the value of the EF Core model. Setting TableNameProvider clears them, so the last assignment wins. The option classes delegate the three properties to the internal class BulkOperationTableNameOptions. A provider that is built from TableName and Schema redirects the root table only and throws when the operation reaches an owned type in a separate table. TableNameProvider is a default interface member on the option interfaces, which builds the same provider from TableName and Schema, so existing implementations keep working. The query-based options implement the new IBulkOperationFromQueryOptions.

SQLite bulk upsert rejects owned types in separate tables with a NotSupportedException before the first write. New tests verify the owned-type support of bulk update and upsert per provider, and the documentation states it per provider. The version is raised to 10.5.0.

10.4.0

Toggle 10.4.0's commit message

Verified

This commit was signed with the committer’s verified signature.
PawelGerr Pawel Gerr
remove artifacts path

10.4.0-beta03

Toggle 10.4.0-beta03's commit message

Verified

This commit was signed with the committer’s verified signature.
PawelGerr Pawel Gerr
fix: prevent other conventions from overriding temp table and collect…

…ion parameter mappings (#75)

10.4.0-beta02

Toggle 10.4.0-beta02's commit message

Verified

This commit was signed with the committer’s verified signature.
PawelGerr Pawel Gerr
fix: apply type-mapping converter for enum properties in bulk operations

10.4.0-beta01

Toggle 10.4.0-beta01's commit message

Verified

This commit was signed with the committer’s verified signature.
PawelGerr Pawel Gerr
deps update

10.3.0

Toggle 10.3.0's commit message

Verified

This commit was signed with the committer’s verified signature.
PawelGerr Pawel Gerr
feat: add translation of guids in min/max window functions to postgres

10.3.0-beta01

Toggle 10.3.0-beta01's commit message

Verified

This commit was signed with the committer’s verified signature.
PawelGerr Pawel Gerr
feat: add translation of min/max aggregates to postgres

10.2.0

Toggle 10.2.0's commit message

Verified

This commit was signed with the committer’s verified signature.
PawelGerr Pawel Gerr
add ai skill

10.2.0-beta02

Toggle 10.2.0-beta02's commit message

Verified

This commit was signed with the committer’s verified signature.
PawelGerr Pawel Gerr
feat: add support for translation of static members