PhilWaldmann / openrecord

Make ORMs great again!
https://openrecord.js.org
MIT License
486 stars 38 forks source link

Cleanup docs #64

Closed amir-s closed 6 years ago

amir-s commented 6 years ago

Apart from these changes, i have noticed that when we have

const Store = require('openrecord/store/sqlite3')

Store.BaseModel is undefined. Although when I create the store = new Store(...), store.BaseModel exist on the instance. I don't know if this is intended and we just need to update the docs, or it's a bug.

PhilWaldmann commented 6 years ago

Hmm, seems like a bug. I‘ll take a look at it tomorrow!

Thank you very much @amir-s The docs are getting better and better, but there is still some work to do. I appreciate Every help!!

amir-s commented 6 years ago

I would love to jump into the code and contribute there too. I started migrating from sequelize to openrecord, and so far everything is going great!

Thanks a lot for the amazing work :)

PhilWaldmann commented 6 years ago

It was a bug! I've fixed it in 25ab5aed8ca45f24c0f4066c849f097363bbcb4c loading openrecord via require('openrecord/store/sqlite3') will return a new constructor with prefilled config options (see /store/sqlite3). The export of the BaseModel was missing there.

Thanks a lot!

It would be awesome if you could contribute to the source as well. If you have skype, you can contact me via https://join.skype.com/invite/NDnbgVZikMLS so I can help you get started faster ;)

amir-s commented 6 years ago

@PhilWaldmann that's amazing! thanks for fixing the bug!