Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-5361

Support for all BSON::* classes as field types

    • Type: Icon: Epic Epic
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • 0
    • 0
    • 0
    • 100

      Summary

      Mongoid currently supports BSON::ObjectId and BSON::Binary as field types. The remaining BSON::* classes are not officially supported and work at best partially:

      • At least some of the types permit storing the value in the declared type if the value is assigned in that exact type (for example, assigning a BSON::Int64 value to a field declared as BSON::Int64 will store it as an int64).
      • Assigning other value types may store them in the assigned type rather than declared field type (e.g. assigning a small integer to a BSON::Int64 field will store it as an int32).
      • Reading stored values may return them in native Ruby types (e.g. a field declared as BSON::Int64 with data stored as int64 will return the value as Integer)

      Due to lack of convenient operators (arithmetic, etc.) on the BSON::* classes they are generally awkward to use and to date we haven't had a user request to specifically return data in these classes. However, for tracking purposes, this epic encompasses known issues that pertain to fields declared as BSON::* types.

      Motivation

      Who is the affected end user?

      Who are the stakeholders?

      How does this affect the end user?

      Are they blocked? Are they annoyed? Are they confused?

      How likely is it that this problem or use case will occur?

      Main path? Edge case?

      If the problem does occur, what are the consequences and how severe are they?

      Minor annoyance at a log message? Performance concern? Outage/unavailability? Failover can't complete?

      Is this issue urgent?

      Does this ticket have a required timeline? What is it?

      Is this ticket required by a downstream team?

      Needed by e.g. Atlas, Shell, Compass?

      Is this ticket only for tests?

      Is this ticket have any functional impact, or is it just test improvements?

      Cast of Characters

      Engineering Lead:
      Document Author:
      POCers:
      Product Owner:
      Program Manager:
      Stakeholders:

      Channels & Docs

      Slack Channel

      [Scope Document|some.url]

      [Technical Design Document|some.url]

            Assignee:
            Unassigned Unassigned
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: