Inverse References and Integrity
The library root object should know the books it has acquired.
Why should each book have a reference back to the library?
The reason is that JADE maintains the integrity of
the objects and collections involved in an inverse reference.
Suppose a book were lost then the corresponding object would be deleted.
JADE would automatically remove the reference to the book
from the library's allBooks collection. |
Instructions (continued)
- For the related Book class, enter myLibrary as the name.
- Select LendingLibrary as the type.
- Change the access to public.
- Click the OK button.
If you have book objects, a message advises that the database needs reorganising.
Do this now. |