-
Notifications
You must be signed in to change notification settings - Fork 216
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
Unable to map JSON properties: 42P01 - relation *** does not exist #1320
Comments
You're calling the MigrateAsync method, but your project doesn't have any actual migrations (those can be created with Cross-posted as https://stackoverflow.com/questions/60856610/how-to-set-up-json-columns-with-npgsql |
Thanks and sorry for bothering. I can see it when using the Npgsql VSIX, if I query SELECT * FROM SomeEntities, I get that error: But if I execute SELECT * FROM public."SomeEntities", I get this error: But I do get the results thereafter (when using |
Anyway, I keep on seeing this error in more occurrences in my project while migrating to Npgsql after calling It helps if I substitute it with: if (env.IsDevelopment())
await appDbContext.Database.EnsureCreatedAsync();
else
await appDbContext.Database.MigrateAsync(); But EF Core SQL provider respected the |
@weitzhandler unfortunately, VS is quite limited (and problematic) in its support of non-SQL Server databases. I looked into the identifier quoting problem with the VS query generator (with the help of a Microsoft dev who really knows it), and this is a real limitation in the product. There's nothing really we can do (see #1320 (comment)). |
Hi,
I'm setting up a mini model and I'm getting this exception when executing the code from the docs website.
Here's my code:
When I call
SaveChanges
, I get the following exception:Here's a repro project.
The text was updated successfully, but these errors were encountered: