Skip to content
This repository was archived by the owner on Apr 23, 2019. It is now read-only.
This repository was archived by the owner on Apr 23, 2019. It is now read-only.

Why are you setting the computer id based on the time? #66

Open

Description

@kdbeall

Why are you setting the id based on the time?
In your ComputerRepository.java

public CompletionStage<Long> insert(Computer computer) {
        return supplyAsync(() -> {
             computer.id = System.currentTimeMillis(); // not ideal, but it works
             ebeanServer.insert(computer);
             return computer.id;
        }, executionContext);
    }

Activity

  1. kdbeall commented on Feb 18, 2018

    @kdbeall
    Author

    Doesn't ebean do this automagically?

  2. marcospereira commented on Feb 21, 2018

    @marcospereira
    Member

    Hi @kdbeall, it is just an example, so not a big deal. But yeah, Ebean should handle it, I think.

    Do you want to submit a pull request to improve this?

    Thank you.

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

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