Skip to content

It would be nice to allow aggregate key to be of different data type #3

@twoixter

Description

@twoixter

Currently, an aggregation key must be a String. For example

aggregate :browsers do |b|
    b.id   # <= This gets automatically casted to a string by calling ".to_s"
end

It would be nice to allow for BSON::ObjectID or DateTime keys. However, this would not be possible without using Inheritance for the Aggregation class model. I can replace the :ns (namespace) field and use Inheritance instead (automatically using the :_type field).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions