Documentation Error: ComplexAspect class has no entityAspect property
Instead there is a method "getEntityAspect()"
This is not an error.
Breeze ‘complex objects’ have a ‘complexAspect’ property that is analogous to the ‘entityAspect’ that is found on ‘entities’.
All complex objects ALSO have a GetEntityAspect() method. The GetEntityAspect method returns the top level EntityAspect associated with the complexObject ( complex objects can be nested so this may go thru multiple parent objects before returning the final parent EntityAspect – this is why this is a method and not a property).
Entity objects by comparision have only a single entityAspect property.
Jay Traband commented
You are right, I will fix the documentation. entityAspect => getEntityAspect() and propertyPath => getPropertyPath(propName). We made these changes several releases back because our general rule is that properties do very little processing and are highly performant, whereas methods often have more overhead and both of these methods require more internal work than a simple property access. And ... thanks for catching this
Maybe I misunderstood, but the documentation for "ComplexAspect Class" (not "ComplexObject"!) is listing two properties named "entityAspect" and "propertyPath". Both are NOT part of the complexAspect property of complexObject, at least not if I take a look at all properties in the console window. What I see is:
Also, taking a look in the current TypeScript definitions file breeze.d.ts there are no such properties, only two methods "getEntityAspect()" and "getPropertyPath()".
Please, make me wise. :-)