Skip to content

Setter rewrite - #1

Open
bnoguchi wants to merge 77 commits into
nw:1.0from
bnoguchi:setterRewrite
Open

Setter rewrite#1
bnoguchi wants to merge 77 commits into
nw:1.0from
bnoguchi:setterRewrite

Conversation

@bnoguchi

Copy link
Copy Markdown

Moved type specific setter logic to the specific type definitions (where I think it should be). Added a 2 new methods, _pre and flagDirty to TypeSchema.prototype to make this easier. All setting logic now takes place in Document.prototype.set, which also can accept a hydration flag or not. Document.prototype._setData now delegates to Document.prototype.set and only (1) determines the appropriate parameters to pass to it and (2) takes care of default values.

Tests seem to behave like before.

bnoguchi and others added 30 commits October 18, 2010 15:39
…of the type (this is advertised as behavior in the README but actually wasn't implemented yet).
…being called but wasn't defined. Improved some code.
…nstead of prop. i is undefined on use. intentions was prop.
Conflicts:
	lib/mongoose/document.js
	lib/mongoose/schema.js
Conflicts:
	lib/mongoose/index.js
	lib/mongoose/type.js
	tests/document.js
	tests/types.js
… using type('array'), which referenced the wrong kind of object.
Conflicts:
	lib/mongoose/types.js
	tests/types.js
tj and others added 30 commits October 21, 2010 14:29
guess it is nice if you *do* have a larger data set, guess you could always re limit(1)
I dunno
…t are TypeSchema instances. Before, this.extend was the used strategy. Now, we keep track of the subtype in the EmbeddedArray instance and handle accordingly. Got most of the tests passing (except for one or more in schema.js testing).
Conflicts:
	lib/mongoose/document.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants