Problem with inheritance, EF 5, and dotConnect for Oracle

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
phowe
Posts: 20
Joined: Fri 12 Jul 2013 16:51
Location: Maine

Problem with inheritance, EF 5, and dotConnect for Oracle

Post by phowe » Wed 11 Dec 2013 13:47

Hi,

We have a couple of tables in our database that include BLOB columns, and are trying to map two different classes to the table, one with the BLOB and one without, so we don't have to retrieve all that extra data just to show a list of available rows. Once a row is selected, we want to use the other (derived) class to retrieve the same row WITH the BLOB column.

We are using EF 5 code first approach to an existing database, and the latest dotConnect. When we run the queries, we get this error:

"ORA-00904: \"Extent1\".\"Discriminator\": invalid identifier"

I understand how a discriminator column would work in EF, but the two classes are not SUPPOSED to be different, we just want the two versions for efficiency. Can someone tell me how I would set up the code model to accomplish this?

Thanks,
Peter

phowe
Posts: 20
Joined: Fri 12 Jul 2013 16:51
Location: Maine

Re: Problem with inheritance, EF 5, and dotConnect for Oracle

Post by phowe » Wed 11 Dec 2013 21:07

I finally got things working with a lot of trial and error. I don't know if my solution is the official way to do things, so if you can point me to the "official" way to accomplish what I described, I can make sure I am doing things by the book.

Thanks.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Problem with inheritance, EF 5, and dotConnect for Oracle

Post by Shalex » Thu 12 Dec 2013 16:58

We recommend you to implement Table Splitting: http://blogs.msdn.com/b/adonet/archive/ ... table.aspx. Table Splitting can be easily (no manual editing of edml) made in Entity Developer: drag&drop particular (unnecessary or with big data) properties from table on the diagram surface and choose Table Splitting in the dialog.

Post Reply