Support Multiple SubCollections of the Same Type #32
Labels
bug
Something isn't working
from_willyovale
An issue described in original project, but never implemented
Description
Defining multiple subcollections of the same type within a Fireorm model causes an error. While there are workarounds, such as extending the class, this should ideally be supported without errors. The issue seems to stem from the way
MetadataStorage.setCollection()
evaluates children before parents and updates segments.Steps to Reproduce
Expected Behavior
Fireorm should support multiple subcollections of the same type within a model without causing errors.
Actual Behavior
An error is thrown when defining multiple subcollections of the same type within a model.
Acceptance Criteria
MetadataStorage.setCollection()
to correctly handle multiple subcollections of the same type.Additional Context
Proposed API Changes
Update MetadataStorage.setCollection:
MetadataStorage.setCollection()
method to correctly handle multiple subcollections of the same type.Support Multiple SubCollections:
Unit Tests:
Example Implementation
Original Issue
The text was updated successfully, but these errors were encountered: