Closed asmodehn closed 7 years ago
Great work! I decided to go back to basics(handle MySQL querying myself) for the current rendition of my project, but I look forward to implementing epilogue with your changes in the future.
Cool feature! If you want some inspirations for the edit part: https://github.com/baptistemanson/epilogue-association-write/blob/master/index.js
@asmodehn Just wanted to clarify -- this change lets you read "thick" data for one-to-many relationships, but won't let you create one-to-many relationships via a REST API?
@danvk reading "thick" data was already possible. But the creation had to be done in 2 steps. With this change, a user can create thick data in one call, passing the full json for the multiple associated resources. I just leveraged the include option for create() as already available in sequelize.
@asmodehn thanks -- turned out I forget to put associations: true
in my epilogue.resource
call. Doh!
@asmodehn Thanks a lot for adding this feature to POST nested JSON objects. Is there a plan to support PUT requests as well ? Please suggest a way to do updates with associations.
@nkagarw I haven't worked on this for a while so I dont remember much about it, sorry... I just remember trying to implement the put in a similar way, but things got a bit trickier so I gave up as I didnt need it at the time. Might be possible though...
The goal here is to be enable a user to create, read, edit, delete associated data via nested JSON object...