forked from stellard/mongoid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HISTORY
88 lines (64 loc) · 2.69 KB
/
HISTORY
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
=== 0.11.4
- Fixed issue with dynamic fields: checking whether
the document responded to the attribute's method
should have checked the setter and not the getter
- Fixed has_one associations not being able to be
set to nil.
=== 0.11.3
- Fixed issue with Document#save! not calling before
and after create callbacks if document is new
=== 0.11.2
- Fixing bug where has many and has one relational
associations create method did not return the
associated document
=== 0.11.1
- Querying for classes that have subclasses will also
return the subclasses as well, similar to
ActiveRecord.
- Adding configuration option allow_dynamic_fields. This
defaults to true and if set to false will raise an
error when trying to set an attribute on an object
that does not have a corresponding field defined.
=== 0.11.0
- Set the collection name to store a document in via:
Document.store_in :collection_name
- Initial inheritance support:
- Documents and their associations can now have an
infinite number of subclasses.
- Has many and has one associations can build or
create specific subclasses by providing an optional
class as the last parameter to the #create and
#build methods on the respective associations.
- Querying for specific subclasses will only return
those documents which were saved as that subclass,
even though the hierarchy is stored in the same
collection.
- Deletion of subclass documents will only delete
documents of that type, even though they all exist
in the same collection. #delete_all and #destroy_all
also support this behavoir.
- Updated mongo and mongo_ext dependencies to 0.18.2
- Fixed save on new documents to return true instead
of the document itself.
=== 0.10.6
- Fixed bug when trying to set empty strings on number
fields. (TypeError: can't convert Fixnum into String)
- Document.delete_all now drops the collection if
conditions are empty or nil.
=== 0.10.5
- Documents that are embedded not properly respond to
Document#destroy and Document#delete.
- Documents can now be saved sans validation with
Document#save(false)
=== 0.10.4
- Documents no longer inherit from Mongoid::Document.
Please include Mongoid::Document in all your models now.
- Config module added, you can now set one option:
Mongoid.raise_not_found_error = (true|false)
- When set to false, a Mongoid::Errors::DocumentNotFound
will NOT get thrown when performing a Document.find(id)
that does not return a document from the database.
This defaults to true.
- Mongoid::Document.collection_name macro added. You can
now set the name of the database collection to persist to.
- Mongoid::Criteria#select becomes Mongoid::Criteria#only