Created
March 22, 2019 13:07
-
-
Save rinaldodev/4565763226389c456935f1654fdcd367 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
public class Usuario { | |
@Id | |
private Long id; | |
@Column | |
private String primeiroNome; | |
@Column | |
private String sobrenome; | |
@Column | |
private String email; | |
@Transient | |
private List<Endereco> enderecos; // cuidado | |
/** | |
* Os endereços são preenchidos apenas por operações específicas do sistema, onde seria difícil recuperá-los de outra forma. | |
*/ | |
public List<Endereco> getEnderecos() { | |
return enderecos; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment