Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Note limitations of PK example #148

Open
d6y opened this issue Jul 11, 2017 · 0 comments
Open

Note limitations of PK example #148

d6y opened this issue Jul 11, 2017 · 0 comments

Comments

@d6y
Copy link
Contributor

d6y commented Jul 11, 2017

In 5.4, we create a generic PK[A]. We say the general point is you have the whole of the Scala type system, but we should probably flag the issues of PK[A].

For example, if you try to do an OO-style:

def delete(id: PK[User]): DBO[Int] = ???
def delete(id: PK[Sale]): DBIO[Int] = ???

...you'll have problems because both methods will be erased to the same signature.

(Less so with a type-class approach, but we're giving examples here, not stating a best practice).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant