Ola galera boa tarde!
Estou tendo um probleminha com o hibernate.
Na hora de atualizar os dados ou na hora de deletar dá esse erro:
[color=red] org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [br.com.vetta.entidades.Pessoa#2]
[/color]
minha entidade Pessoa:
@Entity
public class Pessoa {
@Id
@GeneratedValue
@Column(name = "id_pessoa")
private int idPessoa;
@NotEmpty
private String nome;
private String sobenome;
@NotEmpty
private String cpf;
private int idade;
private int telefone;
@Email
private String email;
@NotEmpty
private String usuario;
@NotEmpty
private String senha;
public int getIdPessoa() {
return idPessoa;
}
public void setIdPessoa(int idPessoa) {
this.idPessoa = idPessoa;
//mais getters e setters aqui...
O que é isso?
