I don't know if this is already on the roadmap, but if DBAction extended ActionBuilder to take in body parsers and have async would be really nice.
I have a play-slick example app using backbone and json calls, so my crud uses body parsers to validate against.
+1 one for this. I am facing similar issue is using DBAction with multipart formdata which needs DBAction(parse.multipartFormData)
The idiomatic play 2.2 way would be to implement DBAction as a composable ActionBuilder so that we can chain other actions easily.
Yep makes sense ... Will fix
As decided in the other threads you can now use body parsers as of 0.5.0.4.
It is not a ActionBuilder, since it was clunky.
@freekh ActionBuilder is Play's recommended way to perform action composition. If the Play Slick plugin is to be integrated in Play 2.3, I do think that this plugin should provide a specialized DatabaseActionBuilder that works with a DBSessionRequest so that users of this pluging can create further specialized custom Actions using it.
The reason I'm asking this is that we want to replace our homemade basic support for Slick-enabled actions with this plugin. We can't however use this plugin's far more sophisticated DBAction functionality without dropping the recommended way to build actions and breaking everything again. We refactored all our code to use this "The Play 2.2 Way" of doing action composition; while I agree it's kind of clunky to write custom actions in this way, it does make actually using those actions in controller code cleaner and more powerful.
Could you please leave this issue open until this plugin provides its own ActionBuilder?
Reopening this as there seems to be room for improvement
@DCKcode Would you mind taking a look at this and creating a PR that adjusts DBAction as you suggest, so we can discuss this?
I'm confused. Will this issue be resolved or won't?
I'm sorry, I wanted to take a look at this, but I can't anymore. It seems as though this code will be refactored anyway though!
Ok! Look forward to see that.
+1 using an action builder would make action composition more easier.
I need a composition of DBAction and UserAuthenticatedAction for exemple
Since play-slick 1.0.0 is using stock Play 2.4, the problem reported in this ticket is no longer actual.
Here are some additional information about the removal of DbAction https://www.playframework.com/documentation/2.4.x/PlaySlickMigrationGuide#DBAction-and-DBSessionRequest-were-removed