Skip to content

Can't map null value to non-nullable property (which is nullable) #29

@goncalo-oliveira

Description

@goncalo-oliveira
.NET 8
Norm.net 5.4.0
PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on aarch64-unknown-linux-gnu

Hi,

I'm seeing the following mapping error

Can't map null value for database field "claims" to non-nullable property "Claims".

Except that the Claims property is actually nullable, so the mapping should have worked I think.

The claims field in the database is an array and it is NULL at this point, yes.

claims text[] null,

In the same way, the class property is a nullable array

public string[]? Claims { get; set; }

Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions