You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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") )
The text was updated successfully, but these errors were encountered:
VR-Architect
changed the title
Postgresql database setup with json field type
Postgresql database setup with jsonb field type
Sep 19, 2024
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; }
`
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") )
The text was updated successfully, but these errors were encountered: