I found the problem by debugging breeze.js library. Breezejs is silently! ignoring navigation properties if there are no constraints defined. I think it should at least print warning about it to javascript console. I will make a push request about it. Problematic line in breeze.debug.js is below.
function parseCsdlNavProperty(entityType, csdlProperty, schema) {
...
var constraint = association.referentialConstraint;
if (!constraint) {
// TODO: Revisit this later - right now we just ignore many-many and assocs with missing constraints.
return;
// Think about adding this back later.
//if (association.end[0].multiplicity == "*" && association.end[1].multiplicity == "*") {
// // many to many relation
// ???
//} else {
// throw new Error("Foreign Key Associations must be turned on for this model");
//}
}
...
}
Because of constraint
is being undefined, method silently returns and ignores the navigation property.
I think this behaivor should also be defined in breeze.js documentation.