zzzprojects / Dapper-Plus

Dapper Plus - High-Efficient Bulk Actions (Insert, Update, Delete, and Merge) for .NET
https://dapper-plus.net/
383 stars 85 forks source link

The BulkInsert ignores postgreSQL array types #87

Closed maliaksei closed 3 years ago

maliaksei commented 3 years ago

Hi. I have a problem with BulkInsert for postgreSQL.

I have next table in postgreSQL

TABLE public.pupils ( id uuid NOT NULL,


current_classes uuid[],
archived_classes uuid[],
***

)

And next related model in application:

public class Pupil{ public Guid Id { get; set; }


public Guid[] CurrentClasses { get; set; }
public Guid[] ArchivedClasses { get; set; }
***

}

For mapping I am using UseBulkOptions(x => x.MatchNamesWithUnderscores = true) and

DapperPlusManager.Entity() .Table("pupils");

But as I see in postgresql logs, array columns always ignored.

LOG: statement: COPY "pupils" ("id", ***) FROM STDIN BINARY

Could you help me with it?

JonathanMagnan commented 3 years ago

Hello @maliaksei ,

We indeed probably doesn't support the array types.

We will look at it if that's possible or not.

Best Regards,

Jon

JonathanMagnan commented 3 years ago

Hello @maliaksei ,

The v4.0.1 has been released.

The array type should now be supported for PostgreSQL.

Let me know if everything now works as expected.

Best Regards,

Jon