Skip to content

Instantly share code, notes, and snippets.

@kubawieczorek
Created December 26, 2019 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kubawieczorek/db4b9c6c602628a47bd8d98a07a97af2 to your computer and use it in GitHub Desktop.
Save kubawieczorek/db4b9c6c602628a47bd8d98a07a97af2 to your computer and use it in GitHub Desktop.
@Transactional
public Account registerNewAccount(Client client){
Account account = new Account();
account.setMoney(0);
account.setNumber(randomUUID().toString());
account.setDateCreated(Instant.now());
account.setClient(client);
return accountRepository.save(account);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment