Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgresql database setup with jsonb field type #145

Open
VR-Architect opened this issue Sep 19, 2024 · 0 comments
Open

Postgresql database setup with jsonb field type #145

VR-Architect opened this issue Sep 19, 2024 · 0 comments

Comments

@VR-Architect
Copy link

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") )

@VR-Architect VR-Architect changed the title Postgresql database setup with json field type Postgresql database setup with jsonb field type Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant