I am doing a application using durandaljs and breezejs. I am trying to get the value of a Navigation Properties. My problem is that when I tryied to call this method in breeze:
user.entityAspect.loadNavigationProperty("userType");
I get the error ""The 'propertyOrExpr' parameter must be a 'string'"". This error is throw for the follow section of code:
var q = new EntityQuery(navProperty.entityType.defaultResourceName);
var pred = buildNavigationPredicate(entity, navProperty);
q = q.where(pred);
The problem is that 'pred' is empty, because 'buildNavigationPredicate' return null. Getting into the 'buildNavigationPredicate':
if (navigationProperty.foreignKeyNames.length === 0) return null;
The problem is that the 'foreignKeyNames' array is empty, all the rest field in the 'navigationProperty' are filled, but I don't know why, but my server doesn't send this information. (Also the foreignKeyNamesServer is empty).
Do somebody have the same problem? can be it a bug of breeze?
Thanks.