Basic usage
Flatten modes
The Mongoid datasource provides three modes for handling embedded documents:flatten_mode: 'auto'
Embedded documents (embeds_one, embeds_many) are automatically converted into separate Forest collections.
flatten_mode: 'manual'
You control which virtual collections are created and which fields are moved to the root level.
flatten_mode: 'none'
Mongoid models are displayed as-is, with embedded objects appearing as raw JSON.
Data navigation
When working with nested or related data, use specific separators:- Nested fields: Use
@@@to access nested properties - Related data: Use
:to navigate relationships
address:city@@@name accesses the name field within city within the address relation.
Source code
This connector is open source. Browse the code or contribute on GitHub:forest_admin_datasource_mongoid.