Miscellaneous
Hot Build (Modify Annotations Without Restarting)
With hot build enabled, changes to Erupt annotations take effect immediately after refreshing the page — no project restart required.
Version support: 1.12.14+
Limitations
- Currently only IntelliJ IDEA is supported; other IDEs require manual exploration.
- Adding new classes or fields does not support hot build — only modifications to existing Erupt annotation values are supported.
Setup Steps
- Go to Settings and enable Reload Class after compilation
- Enable On Frame deactivation → Update Classes and resources
- Enable the hot build configuration:
yaml
erupt:
# Do not enable in production
hot-build: true- Start the application in debug mode (required — run mode will not work)
- Modify an annotation value (e.g., change a name or add sorting), then refresh the page to see the effect (hot build typically takes 2–6 seconds)
Soft Delete (Logical Delete)
Soft delete is essentially an update operation. Instead of physically removing a record, it marks a boolean field (deleted) or a status field (status) as deleted.
Implementation
java
@Erupt(
name = "Soft Delete",
filter = @Filter("deleted = false"),
)
@SQLDelete(sql="update test set deleted = true, deleteTime = now() where id = ?")
@Table(name = "test")
@Entity
public class Test extends BaseModel {
@EruptField(
views = @View(title = "xxx"),
edit = @Edit(title = "xxx")
)
private String name;
private Date deleteTime;
private Boolean deleted = false;
}How It Works
- The
deletedfield acts as the soft-delete flag. - The
@SQLDeleteannotation overrides the default delete SQL. - The
filterattribute filters out deleted records in all queries.
