(Quick Reference)

Purprose

Convenience method to emulate Map functionality.

Example

Smartionary.size('fruits')

Description

size() behaves slightly differently from its Map counterpart.

If the Smartionary does not exist, the result is -1.

If the Smartionary exists but it does not have any SmartionaryEntry associations, the result is 0 (this is strictly for distinction, as a has-many association field may be null, rather than an empty Set or List).

Otherwise, the behavior is the same as its Map counterpart.