none
Table Splitting Bug in Entity Framework RRS feed

  • Question

  • I have encountered a bug when querying with MergeOption.NoTracking over Table Splitting entities.
    The error only happens when:
    • Using POCO entities, (the entities are generated with the poco template) .But the error does not happens when using the default entities which inherits from Entity Object.
    • Querying with MergeOption.NoTracking.
    • Querying an Entity and get the related entity where both entities are mappet to the same Table (Table Splitting).
     
    for example:
    In the model below
    Both entities are mapped to the same table.
    I do the next:
     
    DBXEntities dc = new DBXEntities();
    var query = dc.Person;
    query.MergeOption = MergeOption.NoTracking;//there's no problem if I don't include this line, but I don't need change tracking and I want to save resources
    Person person = query.FirstOrDefault();
    PersonPicture picture = person.PersonPicture;//InvalidOperationException
    

    and in the last line where PersonPicture is Lazy loaded, an InvalidOperationException() is thrown, when the "Association Fixup"  Of the poco entity is being carrying out:
     
    what do you make about it?
    is it a bug? is it reported?



    • Edited by czart Tuesday, October 11, 2011 2:46 PM correccion
    • Changed type czart Tuesday, October 11, 2011 2:47 PM necesito una respuesta
    Monday, October 10, 2011 6:57 PM

All replies