Search⌘ K

Multi-Valued Reference Properties

Explore how to implement unidirectional non-functional associations in JavaScript by creating multi-valued reference properties. Understand when to use arrays or maps to manage collections of object references in models, and learn to code constructor functions and setters that handle these properties effectively.

Introduction

A unidirectional non-functional association is either one-to-many or many-to-many. In both cases, such an association is represented or implemented with the help of a multi-valued reference property.

In this chapter, we’ll learn to:

  1. Derive a JS class model from an OO class model with multi-valued reference properties that represent unidirectional non-functional associations.
  2. Code the JS class model in the form of JavaScript model classes.
...