c# - "Column not allowed here" in EF6 with TPH and Devart Oracle -
c# - "Column not allowed here" in EF6 with TPH and Devart Oracle -
when creating db schema ef, devart dotconnect generates next sql tph class:
create table "types" ( id number(10) not null, "name" nvarchar2(50) null, "discriminator" nvarchar2(128) default (undefined) null, constraint "pk_types" primary key (id) )
i "ora-00984: column not allowed here" error. seems quite obvious, has 'undefined' in discriminator column declaration. bug in dotconnect or did wrong mapping? seems quite simple case. there dozen classes extending abstracttype, none of them adds new columns.
my poco class:
public abstract partial class abstracttype { public int id { get; set; } public string name { get; set; } }
mapping:
public class abstracttypemap : entitytypeconfiguration<abstracttype> { public abstracttypemap() { haskey(t => t.id); totable("types"); this.property(t => t.name).hasmaxlength(50); this.property(t => t.id).hascolumnname("id"); this.property(t => t.name).hascolumnname("name"); } }
i'm using ef 6.1.1, dotconnect oracle 8.4.171 on local 11g express install.
we have answered @ our forum: http://forums.devart.com/viewtopic.php?f=1&t=29872#p102533.
c# oracle entity-framework-6 devart dotconnect
Comments
Post a Comment