Closed ajonno closed 2 years ago
Thanks for making such a detailed issue! I believe your problems is because you need to add a Column
attribute! (I’m not actually sure what The ForeignKey
attribute is referencing, that’s not an attribute included with postgrest-csharp)
Could you try:
[Column("movie_id")]
[ForeignKey(“movie_id”]
public string MovieId { get; set; }
my pleasure, its a great api by the way for supabase, we're using it in a Blazer web app portion of the solution we're building. yep that was it ! thanks for quick reply.
Having a lot of trouble (errors) trying to insert data into a many to many join table, which I think is because perhaps ive not defined correctly?
ERROR: "null value in column "movie_id" of relation "movie_cast" violates not-null constraint"
Thing is, the value being used in the movie_id field is clearly, not null!
This is the join table:
Here is attempt to insert a row which keeps failing:
Just to note, I can successfully insert a row to this table when using SQL.