Why is breeze.js not showing entity type names with some of my entities but they are in the metadata instead it gives the entity the following name 'proto._setCtor.proto'. When ever I do an api call that returns an iqueryable of a specific entity, the client shows the results as of type 'proto._setCtor.proto'. Below is an example of my mapping.
public class printer
{
public Guid PrinterId { get; set; }
public string SerialNumber { get; set; }
public virtual ICollection<StaffModel> StaffModels { get; set; }
}
public class Staff
{
public Guid StaffId { get; set; }
public string Name { get; set; }
public int PrinterId { get; set; }
public virtual Printer Printer { get; set; }
}
public class StaffMap
{
//all is in a constructor
ToTable("tblStaff");
HasKey(x =>x.StaffId);
Property(x =>x.StaffId);
Property(x =>x.PrinterId);
HasOptional(x =>x.printer).WithMany(x=>x.StaffModels).HasForeignKey(x =>x.StaffId);
}
When ever I make a call to the web api(Printers) which returns an IQueryable using breeze the returned entiry type is 'proto._setCtor.proto. If ever I remove the mapping the returned entity type is off type object which is what I want. I am planning to extend the Printer entity on the model but i can not do that if breeze returns 'proto._setCtor.proto' as an entity type.