Skip to content

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

@stewSquared

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions