As I stated in other pull requests, I have approached Supermodel to fix and extend functionality for making it even more useful. I have requested two new features so far: local relationships and jsonify. I planned to make some useful functions concerning to inheritance through 'super' method feature but results to be very tricky and not as useful as I expected (Javascript is not prepared to work with inheritance sugar yet).
Modification
This time, however, I bring you the possibility to overcome the constraint to not be able to include your own initialize method when you define a base Supermodel.
var Model = Supermodel.Model.extend({
initialize: function(options) {
// My initialize logic
}
});
Prior to my modification, my initialization logic would override Supermodel's one, therefore the instantiated models would not be prepared to work as Supermodels. Now, it will work well. :D
Hi again!
As I stated in other pull requests, I have approached Supermodel to fix and extend functionality for making it even more useful. I have requested two new features so far: local relationships and jsonify. I planned to make some useful functions concerning to inheritance through 'super' method feature but results to be very tricky and not as useful as I expected (Javascript is not prepared to work with inheritance sugar yet).
Modification
This time, however, I bring you the possibility to overcome the constraint to not be able to include your own initialize method when you define a base Supermodel.
Prior to my modification, my initialization logic would override Supermodel's one, therefore the instantiated models would not be prepared to work as Supermodels. Now, it will work well. :D
Enjoy it!