-
Notifications
You must be signed in to change notification settings - Fork 67
Changelog
jagi edited this page Jul 18, 2015
·
3 revisions
- Indexes
- Support for legacy browsers by using the
Astro.config.supportLegacyBrowsers
flag - Child classes can have the same amount of fields as a Parent class
- Ability to set the
_id
field on a document's creation
- Changed utilities namespace
- Removed automatic setters and getters
- Nested validators
- Changed the way validators are added to the class
- Changes in API:
-
Astro.Module
toAstro.createModule
-
Astro.Type
toAstro.createType
-
Astro.Behavior
toAstro.createBehavior
-
Astro.Validator
toAstro.createValidator
-
Astro.modules
- list of all added modules -
Astro.classes
- list of all created classes -
Astro.types
- list of all types -
Astro.validators
orValidators
- list of all added / created validators -
Astro.behaviors
- list of all added behaviors
-
- Relations
- Moving all methods from Schema to Class
- EJSON-ification of Astronomy objects
- Rewrite events system and introduce events propagation
- Rename validation helpers
- Global events system
Astro.eventManager.on('validationerror', function(e) {
return 'Custom error message';
});
- Better modified fields detection
- New events system
- The field type definition in the form of string instead casting function.
// Before.
Post = Astro.Class({
/* ... */
fields: {
title: {
type: String, // Change.
default: ''
}
}
});
// After.
Post = Astro.Class({
/* ... */
fields: {
title: {
type: 'string', // Change.
default: ''
}
}
});
- Documents transformation into class instances is now set to
true
by default.
// Before
Post = Astro.Class({
/* ... */
transform: true
});
// After
Post = Astro.Class({
/* ... */
// Don't have to write "transform: true" anymore.
});