Split Entity mapping producing unexpected results with oracle database -


i using following mapping map split entity , producing unexpeted results trying map table

public class testresultmap : entitytypeconfiguration {

public testresultmap() {     #region property => column mapping          //test table     property(e => e.id)         .hascolumnname("test_number");      property(e => e.analysis)         .hascolumnname("analysis");      property(e => e.componentlist)         .hascolumnname("component_list");      property(e => e.status)         .hascolumnname("status");      //result table     property(e => e.maximum)         .hascolumnname("maximum");      property(e => e.minimum)         .hascolumnname("minimum");      property(e => e.outofrange)         .hascolumnname("out_of_range");      property(e => e.name)         .hascolumnname("name");      property(e => e.text)         .hascolumnname("text");      property(e => e.typical)         .hascolumnname("typical");      property(e => e.units)         .hascolumnname("units");         #endregion     #region split entity mapping      map(m =>             {                 m.properties(t => new                 {                     t.id,                     t.componentlist,                     t.analysis,                     t.status                 });                 m.totable("test", settings.default.dbschema);             });             map(m =>             {                 m.properties(t => new                 {                     t.name,                     t.text,                     t.units,                     t.outofrange,                     t.minimum,                     t.maximum                 });                    m.totable("result", settings.default.dbschema);             });          #endregion     #region key & relationship mapping     haskey(e => e.id);       #endregion } 

}

which producing following sql

-       testresults {select       1 "c1",       cast( "extent1"."test_number" number(9,0)) "c2",      "extent2"."status" "status",      "extent2"."analysis" "analysis",      "extent2"."component_list" "component_list",      "extent3"."name" "name",      "extent3"."text" "text",      "extent3"."units" "units",      "extent3"."out_of_range" "out_of_range",      "extent3"."minimum" "minimum",      "extent3"."maximum" "maximum",      "extent1"."typical" "typical",       cast( "extent2"."testedsample_id" number(9,0)) "c3",      "extent2"."instrumentused_identifier" "instrumentused_identifier"       "dbo"."testresult11" "extent1"     inner join "sm2011"."test" "extent2" on ( cast( "extent1"."test_number" number(9,0))) = ( cast( "extent2"."test_number" number(9,0)))     inner join "sm2011"."result" "extent3" on ( cast( "extent1"."test_number" number(9,0))) = ( cast( "extent3"."test_number" number(9,0)))}  system.linq.iqueryable<lanxess.data.models.testresult> {system.data.entity.infrastructure.dbquery<lanxess.data.models.testresult>} 

and throwing error table testresult11 doesnt exist expect because doesnt exist in fact trying use dbo mssql schema , using oracle database rest of mappings work fine , mapping correct columns schemas , tables 1 giving me problem

do need add additional mapping acheive oracle or mapping wrong

closing problem was not 1:1 relationship after caused multiple records appearing in mapping causing exception


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -