You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 23, 2019. It is now read-only.
Repository navigation
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
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
kdbeall commentedon Feb 18, 2018
Doesn't ebean do this automagically?
marcospereira commentedon Feb 21, 2018
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.