breeze - Collection navigation properties may NOT be set on ICollection property -


i have 2 clases in relation one-many:

public class classsa   {     public int id { get; set; }      public int classbid { get; set; }      public virtual classb classb { get; set; }   }    public class classb   {     public int id { get; set; }      public string example { get; set; }      public virtual icollection<classa> classacollection { get; set; }   } 

when execute query:

var query = entityquery.from('classb'); 

i exception: "collection navigation properties may not set" in q.js during map entity property 'classacollection'. how execute query properly?

i don't think problem has how querying, think has else in code. exception seems straight forward - trying pass value collection property?

you trying use knockout's setter set value of navigation property such somewhere in code -

classaobservable.classacollection(data.results); 

where meaning push each object -

classaobservable.classacollection.push(result); 

and better option map classa results classb entities don't have explicitly this. without seeing doing hard determine method take.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -