I have entities with navigation properties, for example "Parent" (an object of EntityType) and "Children" (array of objects of EntityType), but when I export those entities to another manager the navigation properties "Parent" and "Children" are null or empty.
I use the next lines:
var query = entityQuery.from('Projects');
var entitiesTmp = manager.executeQueryLocally(query); //entitiesTmp have navigation properties
var exportData = manager.exportEntities(entitiesTmp);
var mgrTmp = new breeze.EntityManager(config.remoteServiceName);
mgrTmp.importEntities(exportData);
var entitiesTmp1 = mgrTmp.executeQueryLocally(query); //entitiesTmp1 doesn't have navigation properties
I have a hierarchical class with the association bidirectional:
public abstract class HClass
{
public HClass()
{
Children = new List<HClass>();
}
[Key]
public int Id { get; set; }
public Nullable<int> ParentId { get; set; }
public string Name { get; set; }
public virtual ICollection<HClass> Children { get; set; }
public virtual HClass Parent { get; set; }
}
I have other classes with Inheritance:
public class AClass : HClass
{
public string Observation { get; set; }
}
public class BClass : HClass
{
public int Number { get; set; }
}
The DbContext in the server:
public DbSet<AClass> Projects { get; set; }
public DbSet<BClass> OtherProjects { get; set; }
Please, help me with this error.
Note: I use breeze 1.3.4