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

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

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 12_01_17
    • Component/s: None
    • Labels:

      Description

      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

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: