Skip to content

Too many unsafe UUID.fromString(id.value) statements. #82

Description

@stewSquared

In the short term, some repos (reimbursements, patients) have a method that help with this:

// unsafe because of types and the possibility of fromString failure
def unsafeUUIDfromId[T](id: Id[T]) = java.util.UUID.fromString(id.value)

Though said method should be used with an explicit type.

Perhaps an even better solution could arise from creating an easy way to instantiate a MappedColumnType for specific Id types.

Edit: didn't mean to name method fromString

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions