TestYourself answers for Collections
- Last Updated: May 3, 2021
- 2 minute read
- Corticon
- Version 7.2
- Documentation
Show me this set of test questions.
- Children of a Parent entity are also known as elements of a collection.
- False. A collection can contain root-level entities.
- True
- True
- Refer to the Rule Language Guide for a full list and description of all collection operators.
- Rule Language Guide
- Order total is equal to the sum of the line item prices on the order.
- Items
- one-to-many (1->*)
- It is not an acceptable replacement because the use of any collection operator requires that the collection be represented by an alias.
- Set the navigability of the association between
OrderandLineItemto Order->lineItem. In other words, make the association one-directional fromOrdertoLineItem. - Optional, convenient
- A collection alias is not required in this case because no collection operator is being applied to the collection.
->forAll->exists-
aroles ->size > 3where aroles is an alias for Actor.rolesmdvd ->isEmptywhere mdvd is an alias for Movie.dVDmdextras ->exists(deletedScenes=T)where mdextras is an alias for Movie.dVD.extrasmgglobes ->exists(win=T)where mgglobes is an alias for Movie.goldenGlobemroles ->size > 15where mroles is an alias for Movie.rolesmdvd.quantityAvailable ->sum >= 100where mdvd is an alias for Movie.dVDmdvd.quantityAvailable ->sum < 2where mdvd is an alias for Movie.dVDmdsuppliers ->size > 1where mdsuppliers is an alias for Movie.dVD.supplier
- Actor, Distributor, DVDExtras
- Actor, Movie
- The
->forAlloperator tests whether all elements of a collection satisfy a condition. The->existsoperator tests whether at least one element of a collection satisfies a condition. - The
->notEmptyoperator tests whether a collection is not empty, meaning there is at least one element in the collection. The->isEmptyoperator tests whether a collection is empty, meaning there are no elements in the collection. - To ensure that the system knows precisely which collection (or copy) you are referring to in your rules,use a unique alias to refer to each collection.