Relations validations doesn't work as expected

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • 5.0.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Imagine you have 2 documents

      class User
            embeds_one :pet, validate: false
      end
      
      class Pet
          embedded_in :user
      end
      

      It should be OK if you want to save user with invalid pet (because of validate: false).

      But it seems validate: false option doesn't work as expected, and you'll get validation error when you wan't to store user with invalid pet!

      My Mongoid version is 4.0.2

              Assignee:
              Dianna Hohensee (Inactive)
              Reporter:
              EhsanYousefi [X]
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: