Skip to content

Support for nullable arrays #1025

Closed

Description

@myrup

I'm running EFCore 2.2.6 and Npgsql.EntityFrameworkCore.PostgreSQL 2.2.4.

I have a database column type of uuid[]. Postgres seems to support NULL values inside of the arrays (e.g. { NULL, "8AF...", NULL } ).

I've marked the EF Core column type as Guid?[] , but get an exception trying to handle it with Npgsql:

System.InvalidCastException: Can't cast database type uuid[] to Nullable´1[]

How do I support possible null values inside arrays of uuid[] columns?

Activity

  1. roji commented on Sep 15, 2019

    @roji
    Member

    The basic ADO level of support for nullable arrays is tracked by npgsql/npgsql#443. Once that's done, some changes will likely be needed in the EF Core provider as well - I'll keep this issue to also track that.

  2. changed the title [-]Handling NULL values inside array of uuid[] columns[/-] [+]Handling NULL values inside arrays[/+] on May 24, 2020
  3. added this to the 5.0.0 milestone on May 24, 2020
  4. changed the title [-]Handling NULL values inside arrays[/-] [+]Support for nullable arrays[/+] on Oct 3, 2020
  5. self-assigned this
    on Oct 3, 2020
  6. added 2 commits that reference this issue on Oct 5, 2020
    8a8f690
    ae60136
  7. added 2 commits that reference this issue on Oct 5, 2020
    c81e848
    a3976bc
  8. added theissue type on Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions