scottwrobinson / camo

A class-based ES6 ODM for Mongo-like databases.
556 stars 80 forks source link

Chaining of hooks is missing #66

Open rajeev-kumar-sharma opened 8 years ago

rajeev-kumar-sharma commented 8 years ago

Hi,

Chaining of hooks should be there. Also decorator should be used instead of naming i.e( preDelete () ), we should have @preDelete, same can be done for collection-name, entity-name rather than constructor.

camo is realy a cool stuff and I am licking forward use of decorator in this.

scottwrobinson commented 8 years ago

Thanks for the suggestion!

Can you give me an example as to what you're expecting for chaining hooks?

Also, as great as decorators would be for Camo, they aren't supported in Node without the use of a transpiler. I don't think it makes sense to include experimental ES7 features in Camo. You could probably still use features like decorators by adding them to a base class yourself.