EntityFrameworkCore.ClickHouse icon indicating copy to clipboard operation
EntityFrameworkCore.ClickHouse copied to clipboard

Support for Variant DataType

Open andreee94 opened this issue 3 months ago • 0 comments

Clickhouse has introduced the variant data type https://clickhouse.com/docs/en/sql-reference/data-types/variant.

The clickhouse driver for c# already supports it https://github.com/DarkWanderer/ClickHouse.Client/pull/436.

This works with dapper using the object or dynamic c# types, but does not work with EF Core with the following error:

The property 'Data.Value' could not be mapped because it is of type 'object', which is not a supported primitive type or a valid entity type. Either explicitly map this property, or ignore it using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in

Any idea how to properly map the variant type?

andreee94 avatar Nov 23 '24 17:11 andreee94