Overview
The current implementation of Dynamic Views (EntityDynamicViewImpl) in Moqui is powerful but has some limitations that restrict its flexibility. To improve its capabilities, we propose a series of enhancements to support more complex query structures.
Identified Challenges & Areas for Improvement
- Lack of Conditional Joins in Dynamic Views
- Currently, joins between member entities rely only on direct key mappings (entityKeyMaps).
- There is no built-in way to define conditional joins dynamically (e.g., JOIN table ON condition).
- Limited Support for Sub-Selects & Static Views
- Dynamic views cannot include a static view as a member entity.
- This prevents the use of sub-queries within dynamic views, making query optimization difficult.