Denis Goncharenko
05/18/2022, 5:12 AMElena Arens
05/18/2022, 5:16 AMDenis Goncharenko
05/18/2022, 5:23 AMElena Arens
05/18/2022, 5:26 AMDenis Goncharenko
05/18/2022, 5:33 AMRichard Ward
05/18/2022, 6:43 AMprisma generate again to make sure your stuff is up to date and then if that doesn't solve it, what happens if you try using `connect`:
PostgreSQL.talk.create({
data: {
user: {connect: {id: 10}}
//rest of your fields..
}
});Denis Goncharenko
05/18/2022, 8:48 AMRichard Ward
05/18/2022, 9:27 AMPostgreSQL.talk.create({
data: {
userId: 10,
dialogueId: 1, // or a valid id
longitude: 111,
latitude: 111
}
});
Does that still give you an error with the userId?Denis Goncharenko
05/18/2022, 9:35 AMDenis Goncharenko
05/18/2022, 9:36 AMDenis Goncharenko
05/18/2022, 9:36 AMRichard Ward
05/18/2022, 9:38 AMhttps://files.slack.com/files-pri/T0MQBS8JG-F03FG6C4QMD/image.png▾
Richard Ward
05/18/2022, 9:40 AMdata show you what it should accept ..
it should work with either specifying all the id's as scalars or using connect for both user and dialogue.Denis Goncharenko
05/18/2022, 9:41 AMRichard Ward
05/18/2022, 9:41 AMuserId: 10 and dialogue: { connect: {id : 1}} then that combination matches neither of the allowed types ..Richard Ward
05/18/2022, 9:42 AM*Unchecked* type puts the responsibility in your hands to ensure the id's exist ..Denis Goncharenko
05/18/2022, 9:48 AM