The "Invalid column" error you receive is caused by the absence of the foreign key columns in your model, as you already figured out. If for some reason there is no column defined in the model association for the foreign key, OpenAccess
will try to generate a column during runtime. If the name that will get generated is not the same as the foreign column name in the database, "Invalid column name <guessed_name>" exception will be thrown. Note that the changes you do to your model table will be applied only in your local model and will not be applied on the database table unless you forward map your changes.
Unfortunately I am not sure which is the exact version of our product you are using and because of this I cannot direct you weather you should run the forward mapping wizard or not (it might not be part of the version you have).,
If case you are using a version that does not contain the forward mapping wizard, you can manually update the database to match your model. You can see how this can be done in the following documentation article
In order to assist you further on this issue, I will need to know the exact version of OpenAccess
you are using. Any additional information regarding your setup will also be of help.
I'm looking forward to resolving this issue with you.
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward!
We'd appreciate your vote for Telerik in this year's SQL Server Community Awards. We are competing in TWO categories and every vote counts! VOTE for Telerik NOW >>