mongo_document 1.4.5
mongo_document: ^1.4.5 copied to clipboard
A code generator for MongoDB-backed Dart models using @MongoDocument annotations - build type-safe, maintainable backend layers.
[1.3.2] - 2025-05-13 #
Fixed #
Aggregation Pipelines shouldn't lookup collections that aren't projected
[1.3.1] - 2025-05-13 #
Added #
Added support for optional db parameter across all crud functions -- Useful mostly in isolates
[1.2.6] - 2025-05-12 #
Fixed #
Update functions should now properly populate object references after the update
[1.1.9] - 2025-05-11 #
Fixed #
Aggregation Pipelines should be able to infer lookups from projections
[1.1.8] - 2025-05-11 #
Fixed #
Fixed a bug in projection-classes code generation where the typecheckers ignored the JsonKey names
of nested collections, and also within the nestedCollectionMap
literals
[1.1.4] - 2025-05-10 #
Fixed #
fix(delete): ensure nested object references use IDs in deleteByNamed variants
Previously, deletes like deleteOneByNamed
assigned entire objects (e.g.,
selector['author'] = author
),
causing incorrect filtering. This fix updates all deleteOneByNamed
and deleteManyByNamed
functions
to reference the object ID instead (e.g., selector['author'] = author.id
).
[1.1.3] - 2025-05-10 #
Fixed #
fix(query): ensure nested object references use IDs in findByNamed variants
Previously, queries like findByNamed
assigned entire objects (e.g.,
selector['author'] = author
),
causing incorrect filtering. This fix updates all findByOneNamed
and findByManyNamed
functions
to reference the object ID instead (e.g., selector['author'] = author.id
).
[1.0.4] - 2025-05-09 #
Added #
- Full support for multi‑level nested queries using MongoDB document references, enabling retrieval of deeply nested data in a single call.
- Validation logic to ensure referenced documents exist before executing nested lookups.
- Examples and recipe in documentation for querying nested sub‑documents via object references.
Fixed #
- Resolved edge case where empty arrays of references would cause query failures.
[1.0.3] - 2025-04-01 #
Added #
- Support for two‑level nested queries (e.g.,
author.book.publisher
references). - Option to specify projection fields on nested referenced documents.
Changed #
- Improved performance of single‑level nested lookups by caching reference resolution.
Fixed #
- Fixed bug where circular references caused infinite loops during population.
[1.0.2] - 2025-03-01 #
Added #
- Initial implementation of nested query support for single‑level MongoDB document references.
Projection*
helper classes to simplify querying referenced documents.
Changed #
- Refactored core query builder to accept an array of reference paths.
Fixed #
- Corrected error handling when reference path is invalid or missing.
[1.0.1] - 2025-02-01 #
[1.0.0] - 2025-01-01 #
- Initial version.