Skip to content

Postgresql database setup with jsonb field type #145

@VR-Architect

Description

@VR-Architect

I created a table using jsonb, not json, and created a master-child grid and form. When I run the project I get this error on create:

42804: column "Json" is of type jsonb but expression is of type text

Does the auto-generation tool know the difference between jsonb and json by chance?

Any recommendations to fix?

Here is the class file:

`
[Table("JobSpec", Schema = "public")]
public partial class JobSpec
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }

    [Required]
    public string Name { get; set; }

    public string Json { get; set; }
}

`

And here is the sql to create the table:

CREATE TABLE IF NOT EXISTS public."JobSpec" ( "Id" integer NOT NULL DEFAULT nextval('"JobSpec_Id_seq"'::regclass), "Name" character varying(100) COLLATE pg_catalog."default" NOT NULL, "Json" jsonb, CONSTRAINT "JobSpec_pkey" PRIMARY KEY ("Id") )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions