Course: 1. Getting started | 2. Modeling with Java | 3. Automated testing | 4. Inheritance | 5. Basic business logic | 6. Advanced validation | 7. Refining the standard behavior | 8. Behavior & business logic | 9. References & collections | A. Architecture & philosophy | B. Java Persistence API | C. Annotations

Lesson 9: References & collections

This lesson is available in PDF:
openxava-course9-references-collections_en.pdf

Note for OpenXava 5.7 and better

Use @AddAction instead of @NewAction to refine the action for adding new elements. For example, change:
@OneToMany(mappedBy="invoice")
@CollectionView("NoCustomerNoInvoice")
@NewAction("Invoice.addOrders") // @NewAction is no longer used for define the add action
private Collection<Order> orders;
By:
@OneToMany(mappedBy="invoice")
@CollectionView("NoCustomerNoInvoice")
@AddAction("Invoice.addOrders") // @AddAction instead
private Collection<Order> orders;

Any problem with this lesson? Ask in the forum