PhilWaldmann / openrecord

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

Model record suggestions #79

Closed arthurfranca closed 5 years ago

arthurfranca commented 5 years ago

What do you think of exposing/documenting record.__exists as there's record.persisted? on Rails? Maybe add a record.isNewRecord as the opposite of isPersisted/exists When doing await record.destroy() or await record.delete(), assign false to record.__exists

Other suggestion: add await record.update({ ... }) as the same as doing await record.set({ ... }).save() for convenience.

PhilWaldmann commented 5 years ago

That's a good idea!

Thanks

PhilWaldmann commented 5 years ago

available in v2.8.0