How can we improve Breeze.js?

Documentation Error: ComplexAspect class has no entityAspect property

Instead there is a method "getEntityAspect()"

2 votes
Sign in
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Heiko shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
planned  ·  AdminAdmin (Product Manager, Breeze.js) responded  · 

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.


Sign in
Sign in with: facebook google
Signed in as (Sign out)
  • Jay Traband commented  ·   ·  Flag as inappropriate

    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

  • Heiko commented  ·   ·  Flag as inappropriate

    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:

    - complexObject
    - originalValues
    - parent
    - parentProperty
    - __proto__

    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. :-)

Feedback and Knowledge Base