-
Notifications
You must be signed in to change notification settings - Fork 19
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
The 'OpenEdgeBoolTypeMapping' does not support value conversions. #10
Comments
Hey @Alfetta159 Can you please confirm the versions of these packages that you're using?
You should have 2.1.11 for the EF Core packages and 1.0.8 for the If you try to use a newer, unsupported version of EF Core it can cause issues. Also can you please let me know if you're trying to map a |
EntityFrameworkCore.OpenEdge 1.0.8 I realize these are forward of the requirement, but I have checked it with the 2.1.11 versions and I get the same result. Keep in mind that I am not trying to map anything. I'm using the Scaffolding cmdlet to generate the database context and models, so I'm expecting the database provider to do that mapping. Again: I'm not familiar with creating a db context provider. How do you debug one? Is it a matter of running the edmgen.exe or does that not work with .NET core? If you would enlighten me, I could give you better information as to the types/fields the provider is finding in my database (which is a third party database) and how it's having trouble. Thx again! |
OK that is interesting. I haven't had this problem before and I have scaffolded large databases before. |
Are you able to run this SQL statement against the database and send me the result? It will return a record set of the datatypes used by the fields in your database. There may be a datatype that you're using that's tripping up the model generator that I'm not using myself.
|
|
hey @Alfetta159 I believe I've found the issue - I was able to reproduce the problem when I was using a version of the EF Core design-time tools that was newer than 2.1.11. I am planning on updating the provider to version 2.2.6 when I get some free time, but for now please ensure all EF Core packages are version 2.1.11 Thanks! |
You're right. I set up a test project based on .Net Core 2.1 with the 2.1.11 EF libraries and it worked much better, but... There are still a lot of warnings. I've condensed them down and removed table and column names. I did notice that a lot of these are missing from the
|
hey - I found that as well and already fixed the |
That does work much better, thank you. Let me use it a bit more for a day or two before you RTM. TL;DR My real challenge here is using a third-party enterprise application that doesn't have a proper API: SOAP, REST, Odata or otherwise. We do have an SSIS project that replicates this data or at least the data that we really need into SQL Server, but that's not real time, and the SSIS project was created w/o considering EF and scaffolding so almost no SQL server tables has a key field and therefore EF to SQL Server can't generate the many tables this db has (nearly 2000). Likewise, most of the real data comes out of views which is still feasible with EF, but very tedious as they can't be scaffolded. Also, many of those views are used for something else, so I end up really needing to write my own views so I don't break something else. Here, I'm hoping to scaffold the tables that I need into an EF library, and then expose that thru an odata API so my other business APIs can just query for what they need in real-time, but my Oauth2 middleware is written in .NET Core 2.2, so I might have to use this with a pass-thru proxy that worries about auth until this library is updated to 2.2. |
OK great. That’s pretty much what we’re doing in production but closer to 400 tables. There are issues/quirks with the way the OE SQL agent behaves; most of the work in creating this provider was to workaround those issues. Simple SQL queries work well but the more complex ones that EF Core generates could sometimes cause issues. I have a branch prerelease/1.0.10 that targets 2.2.x which you can try out in your project while targeting .NET Core 2.2 as well. I have fixed a few issues relating to the migration to 2.2 but there are still a couple of issues remaining related to parameters, which can be tricky to diagnose. Once I have those sorted it should be good for 2.2. |
When I run the
Scaffold-DbContext
cmdlet, I get the following error.The 'OpenEdgeBoolTypeMapping' does not support value conversions. Support for value conversions typically requires changes in the database provider.
I'm not familiar with creating a db context provider. How do you debug one. Is it a matter of running the edmgen.exe or does that not work with .NET core?
More info:
The text was updated successfully, but these errors were encountered: