This discussion is archived
1 2 Previous Next 27 Replies Latest reply: Jun 28, 2012 3:27 AM by DNETFX RSS

ODAC Beta 3 mapping number(1,0) to Boolean in Entity Framework

nswandel Newbie
Currently Being Moderated
After moving to Beta 3 I have an issue with the mapping of number(1,0) to Boolean. I have modified my app.config as per the Readme / Release Notes to include the following right after </connectionStrings>

<oracle.dataaccess.client>
<settings>
<add name="bool" value="edmmapping number(1,0)" />
</settings>
</oracle.dataaccess.client>

It seems the app.config directive is being ignored since I get the message for every occurrence of such a mapping similar to:

Error 2019: Member Mapping specified is not valid. The type 'Edm.Boolean[Nullable=False,DefaultValue=]' of member 'IS_FOREIGN_KEY' in type 'Model.M_ATTRIBUTE_FK_MAPPING' is not compatible with 'OracleEFProvider.number Nullable=False,DefaultValue=,Precision=1,Scale=0]' of member 'IS_FOREIGN_KEY' in type 'Model.Store.M_ATTRIBUTE_FK_MAPPING'.

As this seems to be the recommended resolution in any related forum threads I find, any further suggestions on a resolution or an approach to troubleshooting this would be much appreciated!
  • 1. Re: ODAC Beta 3 mapping number(1,0) to Boolean in Entity Framework
    nswandel Newbie
    Currently Being Moderated
    Well the mysteries of app.config seem to be the origin of my pain....

    I moved my app.config piece to be last thing the <configuration> section and presto! Not sure why this should matter. Perhaps some other sections resets something...

    app.config has always seemed like voodoo to me...

    need a application development shaman to sort that stuff out.

    Hopefully this thread will be some assistance to others.

    Regards!

    Edited by: nswandel on Nov 9, 2011 10:16 AM
  • 2. Re: ODAC Beta 3 mapping number(1,0) to Boolean in Entity Framework
    nswandel Newbie
    Currently Being Moderated
    Stranger still ... opening the EF model in the XML editor without changing it and the errors return. Moving my section of the app.config and rebuilding and the are gone again... very strange behaviors
  • 3. Re: ODAC Beta 3 mapping number(1,0) to Boolean in Entity Framework
    nswandel Newbie
    Currently Being Moderated
    Validate also bring the errors back... moving the section in the app.config gets rid of them.
  • 4. Re: ODAC Beta 3 mapping number(1,0) to Boolean in Entity Framework
    nswandel Newbie
    Currently Being Moderated
    Still not working consistently... seemingly innocuous action in the Visual Studio interface bring the issues back.
  • 5. Re: ODAC Beta 3 mapping number(1,0) to Boolean in Entity Framework
    899325 Newbie
    Currently Being Moderated
    I am having the exact same problem. I am getting the following error:


    Error     139     Error 2019: Member Mapping specified is not valid. The type 'Edm.Boolean[Nullable=False,DefaultValue=]' of member 'IS_AUDITABLE' in type 'Model.R_ACTION' is not compatible with 'OracleEFProvider.number[Nullable=False,DefaultValue=,Precision=1,Scale=0]' of member 'IS_AUDITABLE' in type 'Model.Store.R_ACTION'.     C:\pathtomyfile.edmx     6324     13     EntityModel

    My app.config looks as such:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    <connectionStrings>
    <add name="EntityContext" connectionString="myconnstring" providerName="System.Data.EntityClient" />
    </connectionStrings>
    <oracle.dataaccess.client>
    <settings>
    <add name="bool" value="edmmapping number(1,0)" />
    </settings>
    </oracle.dataaccess.client>
    </configuration>

    Hopefully someone is able to help.
  • 6. Re: ODAC Beta 3 mapping number(1,0) to Boolean in Entity Framework
    nswandel Newbie
    Currently Being Moderated
    Well, while I still have to refresh the app.config if I validate the model or look at with the XML editor, but when I do a meaningless edit to the app.config and rebuild, the errors are gone. I suggest you try changing you app.config and rebuild. Let me know if this works for you. it works for me!
  • 7. Re: ODAC Beta 3 mapping number(1,0) to Boolean in Entity Framework
    899325 Newbie
    Currently Being Moderated
    Wow...that appears to have fixed the problem. But as you said, whenever I make changes to my model the issues return. Thanks for the help...but hopefully we can get a bit more clarity on what is actually going on.
  • 8. Re: ODAC Beta 3 mapping number(1,0) to Boolean in Entity Framework
    Tridus Journeyer
    Currently Being Moderated
    Are these actual errors?

    Beta 2 gave me that error constantly, but only when working on the file. It actually compiled and ran just fine. They were false errors. There was also some voodoo that would make them temporarily disappear (stuff like opening Help > About in Visual Studio), but nothing made them go away permanently. I wound up just learning to ignore them because they don't happen in a running project.

    So that's the question for me. Did these change from false errors in beta 2 to real errors in beta 3 that block running the project?
  • 9. Re: ODAC Beta 3 mapping number(1,0) to Boolean in Entity Framework
    899325 Newbie
    Currently Being Moderated
    I'm getting a real error that will not allow me to build. The build fails and then a project that references my Entity Model project can not build due to missing DLL.
  • 10. Re: ODAC Beta 3 mapping number(1,0) to Boolean in Entity Framework
    nswandel Newbie
    Currently Being Moderated
    Actual errors for me as well, but resolved, as mentioned before, when I make a meaningless revision to app.config. I also notice that this app.config tweak is also need when I reopen Visual Studio (errors return). It appears that there are multiple paths to the "buiild" and some ignore the app.config and you need to "touch" the app.config to get the next build to reinstantiate what is set in the app.config. Very strange behavior. I have no idea how this could be traced. Perhaps someone more experinced can comment one this.

    Edited by: nswandel on Nov 9, 2011 4:04 PM

    Edited by: nswandel on Nov 9, 2011 4:05 PM
  • 11. Re: ODAC Beta 3 mapping number(1,0) to Boolean in Entity Framework
    Tridus Journeyer
    Currently Being Moderated
    Odd. I wonder if something changed between beta 2 and 3 on this?

    Just to make certain of one thing - if you have the edmx model in a seperate assembly, you need the app.config entries in the app.config/web.config of your executable as well as the app.config of the assembly project.

    Edited by: Tridus on Nov 9, 2011 7:23 PM
  • 12. Re: ODAC Beta 3 mapping number(1,0) to Boolean in Entity Framework
    899325 Newbie
    Currently Being Moderated
    Tridus,

    My EDMX file is indeed in it's own assembly called "EntityModel". I have many other tiers that depend on this assembly all the way up to an ASP.NET 4 MVC 3 web application. Are you saying that every single assembly in that dependency tree needs those settings in the respective app.config/web.config? That doesn't see to make sense. If you think that is the case, I can give it a shot.
  • 13. Re: ODAC Beta 3 mapping number(1,0) to Boolean in Entity Framework
    Tridus Journeyer
    Currently Being Moderated
    Not all of them, no. But the last ones do. Your assembly's app.config isn't carried forward when you include that assembly in another project, which includes it in another project, which calls it from a .exe. That .exe's config file is the one loaded, and if the settings aren't there then it's not going to work.

    In my case I have my edmx in an assembly. Another assembly calls it. Both assemblies are included in a website, where a controller calls the one that calls the edmx one. The website's web.config needs the config data for the boolean mapping in order for it all to work. The other assembly doesn't.

    Edited by: Tridus on Nov 10, 2011 9:17 PM
  • 14. Re: ODAC Beta 3 mapping number(1,0) to Boolean in Entity Framework
    zeroid Newbie
    Currently Being Moderated
    I've been suffering the exact same problem through all the EF betas. I really hope they fix it in the final release.

    I have the config section added to both the app.config in my entity model assembly and all of the app.configs for any application assembly that uses the entity model assembly. I still get these incorrect error messages when building my solution. I can sometimes get rid of them by double clicking on one to open the edmx view and then closing that window immediately.

    It never stops the applications themselves from running
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points