The :type of field use like foreign_key is String by default

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      If you use only BSON::ObjectID, when you define an association with references_many, The foreign_key is create without :type. So in Mongoid, the default type is String. But we want this foreign_key in same type of primary key.

      I made a path to do that.

      http://github.com/shingara/mongoid/commit/9d743b165ca348e023aefdd6161bbb5a2bf6697d

            Assignee:
            Unassigned
            Reporter:
            Cyril Mougel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: