Skip to content

Note limitations of PK example #148

@d6y

Description

@d6y

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions