I'm pretty new to both play and slick. But given that slick is where relational DB integration in play is going, I'm trying to put together a project which combine the two in the right way.
I've got the new slick code generation feature working which is a nice thing (from DB to slick code), but I wonder what the right way is to integrate it in a play2 project. The codegen generates a Tables.scala defining all the case classes, TableQueries etc. encapsulated in a Trait "Tables". I would want to have the main case classes along with helper methods etc. in separate Users.scala, Companies.scala etc. files in the models package and keep the Tables.scala separate so that it can be regnerated upon schema changes.
So how can I keep things clean without copy-pasting code from the codegenerator output?
It would be great to have a full example showcasing play2 + a couple of models + latest slick and code generation + schema evolutions + suggested workflow.
Many thanks for feedback, it's much appreciated. Hopefully it's not obvious and I'm simply not seeing it ..