Relation Components Overview
Erupt provides several relation components corresponding to different relationship types in JPA.
These components are relatively complex to use. It is recommended to familiarize yourself with JPA and understand one-to-one, one-to-many, and many-to-many relationships before using them.
Relation Type Reference
| Component Type | JPA Relationship | Use Case | Documentation |
|---|---|---|---|
REFERENCE_TABLE | @ManyToOne | Many-to-one, select via table popup | Details |
REFERENCE_TREE | @ManyToOne | Many-to-one, select via tree popup | Details |
CHECKBOX | @ManyToMany | Many-to-many, checkbox form | Details |
TAB_TREE | @ManyToMany | Many-to-many, tree selection | Details |
TAB_TABLE_REFER | @ManyToMany | Many-to-many, table selection | Details |
TAB_TABLE_ADD | @OneToMany | One-to-many, inline child record creation | Details |
COMBINE | @OneToOne | One-to-one, inline creation, supports JSON storage | Details |
Selection Guide
- Many-to-one: Use
REFERENCE_TABLE(list-style data) orREFERENCE_TREE(hierarchical data) - Many-to-many: Use
CHECKBOX(few options),TAB_TREE(hierarchical), orTAB_TABLE_REFER(list-style) - One-to-many: Use
TAB_TABLE_ADDto manage child table data directly within the parent record's edit dialog - One-to-one: Use
COMBINE, which supports storing the associated object as JSON in the same column