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 has been archived by the owner on Apr 23, 2019. It is now read-only.
Can you help me please to use only computer ebean instead of ( computer , company ) !
public CompletionStage<Result> create() {
Form<Computer> computerForm = formFactory.form(Computer.class);
Computer computer = computerForm.get();
// I don't know how to change this only for compter or may be remove it ?!!!
return companyRepository.options().thenApplyAsync((Map<String, String> companies) -> {
return ok(views.html.createForm.render(computerForm)); }, httpExecutionContext.current());
}
public CompletionStage<Result> save() {
Form<Computer> computerForm = formFactory.form(Computer.class).bindFromRequest();
if (computerForm.hasErrors()) {
// How to change this line for computer only
return companyRepository.options().thenApplyAsync(companies -> {
return badRequest(views.html.createForm.render(computerForm));
}, httpExecutionContext.current());
}
Computer computer = computerForm.get();
return computerRepository.insert(computer).thenApplyAsync(data -> {
flash("success", "Computer " + computer.name + " has been created");
return GO_HOME;
}, httpExecutionContext.current());
}
The text was updated successfully, but these errors were encountered:
Hello,
Can you help me please to use only computer ebean instead of ( computer , company ) !
The text was updated successfully, but these errors were encountered: