-
Notifications
You must be signed in to change notification settings - Fork 66
Changelog
jagi edited this page Jul 18, 2015
·
3 revisions
- Indexes
- Support for legacy browsers by using the
Astro.config.supportLegacyBrowsersflag - Child classes can have the same amount of fields as a Parent class
- Ability to set the
_idfield 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.ModuletoAstro.createModule -
Astro.TypetoAstro.createType -
Astro.BehaviortoAstro.createBehavior -
Astro.ValidatortoAstro.createValidator -
Astro.modules- list of all added modules -
Astro.classes- list of all created classes -
Astro.types- list of all types -
Astro.validatorsorValidators- 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
trueby default.
// Before
Post = Astro.Class({
/* ... */
transform: true
});
// After
Post = Astro.Class({
/* ... */
// Don't have to write "transform: true" anymore.
});