Created
July 1, 2013 03:25
-
-
Save pedrofurla/5898177 to your computer and use it in GitHub Desktop.
auto increment insert in slick. There must be better way.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def autoInc = * returning id.? into { | |
case (Person(_, a, b,c ,d), id) => Person(id, a, b, c, d) | |
} | |
def autoInc2 = fullName ~ birthday ~ login ~ password returning id.? into { | |
case (m, id) => Function.uncurried(((Person.apply _).curried(id))).tupled(m) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment