```+ id: Int } } Argument id for data.id is m...
# orm-help
a
Copy code
+   id: Int
  }
}

Argument id for data.id is missing.
r
Does it have a default value? If not then you need to provide the value.
a
here is the schema
id Int @id
@Ryan It's a primary key and I want it be auto generated when I create an entry
r
So it should be:
Copy code
id Int @id @default(autoincrement())
a
Yes. Thanks. I'm using pg admin to create the fields and doing introspect to fetch the schema
r
Then what did you write in PgAdmin? Could you share the SQL?
If you have set it as autoincrement then it should show it as that after introspection.
a
Yes. Forgot to set the identity constraint
Now this is working as expected
đŸ’¯ 1
150 Views