Closed pilsy closed 10 years ago
As per #2
@pilsy since this was closed, is this available? I still can not see documentation on how this would be configured. Thank you for your work on this.
@mrsollis Yes sorry i have not had a chance to update the documentation, i will be updating it today however...
Essentially all Models in CleverStack are now first class citizens, meaning when you write a model it can either work on ODM or ODM - you don't need to change any of the actual fields or definition... and you can also simply use native types
{ name: String, email: String, someNumber: Number, someDate: Date // ... etc }
To make the auth module use ODM, The only change you need to make is on https://github.com/CleverStack/clever-auth/blob/master/models/UserModel.js#L2
Change, ORM - to ODM.
Of course you will need to clever install clever-odm
and configure it to work with your mongo installation but essentially all you need to do is change that one "ORM" to "ODM" and you are away.
And i should point out that today i plan to move that one line into the config @mrsollis
@mrsollis take a look at this commit, in the description it shows you how to choose ORM or ODM in your config
https://github.com/CleverStack/clever-auth/commit/954d2bf7cfa5d1e00a7d6cd6da04439e34666f08