-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Associations, Persistence
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Failing test case:
animal = ForeignKeySpec::Animal.create!(a: 'bear')
zoo = ForeignKeySpec::Zoo.create!(z: 'bz')
animal.zoos << zoo
animal.save!
# This write should not be necessary, but without it the test fails.
zoo.animals << animal
zoo.save!
expect(zoo.animals).to eq([animal])
zoo = ForeignKeySpec::Zoo.find(zoo.id)
expect(zoo.animals).to eq([animal])
Due to this bug 4642 does not document specifying PK/FK with HABTM, since the combo appears to not work.
- related to
-
MONGOID-4642 Document primary_key/foreign_key
-
- Closed
-
- links to