3 ms·
Users.forInsert insert User(None, "Christopher", "Vogt") Personally, I don't find that to be a lot of ceremony. Now, Slick definitely still has some problems
by saryant 13y ago
Users.forInsert insert User(None, "Christopher", "Vogt")
Personally, I don't find that to be a lot of ceremony. Now, Slick definitely still has some problems and requires too much boilerplate, I'll certainly agree with that but I don't think this is one of those cases (though it could be improved).
- TylerE 13y agoTHe ceremony is creating the "for insert" facade. To me the logical thing to do would be for Slick to have an "AutoInc Int/Long" type that is implicitly convertable from Option, so that you could just do a normal insert and the the None value just causes the id column to be omitted.