Skip to content

Commit

Permalink
A bunch of changes, new tests and fixes
Browse files Browse the repository at this point in the history
I've also changed the way instances are wrapped to allow you to just
return the document instead (same as the old `wrap: false` option). If
you are creating a custom instance implementation you will need to
handle setting pass-through properties yourself.
  • Loading branch information
notheotherben committed Apr 22, 2015
1 parent 976e954 commit 2d5929b
Show file tree
Hide file tree
Showing 26 changed files with 614 additions and 155 deletions.
2 changes: 2 additions & 0 deletions _references.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/// <reference path="./typings/tsd.d.ts" />
/// <reference path="./typings/skmatc/skmatc.d.ts" />
/// <reference path="./typings/concoction/concoction.d.ts" />
2 changes: 1 addition & 1 deletion example/IntelliSense.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/IntelliSense.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/IntelliSense.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MyDB extends Iridium.Core {
]
});

PlainUsers = new Iridium.Model<UserDoc, UserDoc>(this,(doc) => doc, "users", {
PlainUsers = new Iridium.Model<UserDoc, UserDoc>(this,(model, doc) => doc, "users", {
username: /^[a-z][a-z0-9_]{7,}$/,
fullname: String,
email: String,
Expand Down
10 changes: 10 additions & 0 deletions example/ModelHookPlugin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions example/ModelHookPlugin.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

168 changes: 168 additions & 0 deletions example/UserModel.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions example/UserModel.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/UserModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export function Users(core: Iridium.Core): Iridium.Model<UserDocument, User> {
}
},
preprocessors: [
Concoction.Rename({
new Concoction.Rename({
_id: 'username'
})
],
Expand Down

0 comments on commit 2d5929b

Please sign in to comment.