-
Notifications
You must be signed in to change notification settings - Fork 8
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
Receiving System.Data.Entity.Core.EntityCommandCompilationException when views are out of date. #13
Comments
It would be interesting to understand how you go this error. The way it is supposed to work is that EF allows getting a hash for each model. The base assumptions in this library is that if the model changes the hash will also change. If views don't exist or the hash for the current model is different from the hash of a model that was previously generated the library regenerates views and store with the new hash. From your description it appears that the hashes of two models were the same even though the models were different. Do you by any chance have the old and new views and can share them? |
The only model change to that entity was unrelated to the error. The |
I wonder if EF could trigger some kind of optimization based on the change you made. Still my understanding is that any model change should change the hash which should trigger regenerating views. I release a new version of Interactive Views just to add support for .NET Core. There were no code changes. Did you also update EF by any chance? |
No. We are in .net 4.x still. |
|
First, we are storing our view cache in the DB.
We ran into an issue where the View cache was out of date and was causing the
System.Data.Entity.Core.EntityCommandCompilationException
to be thrown.Inner Exception:
The query view generated for the EntitySet 'Vendors' is not valid. The query parser threw the following error : The argument type 'Edm.String' is not compatible with the property 'IsTraining' of formal type 'Edm.Boolean'.
I ended up clearing the
__ViewCache
table and restarted the application. When is the view cache updated? Should we be performing any maintenance on the table, regularly?The text was updated successfully, but these errors were encountered: