Objeto alterado esta vindo como null na consulta

Boa noite,
Pessoal estou com um problema com o alterar de minha aplicação. Estou usando JSF 2.0 com PrimeFaces 3.3.1, é o seguinte tenho o meu dialog com os campo e um selectOneMenu para selecionar o estado; Na gravação, exclusão e listagem funciona perfeito, mas, quando mando alterar ele alterar no banco de dados e não mostra no datatable o estado que foi alterado. Fiz um list e deu um system.out.print desta lista logo após a alteração e ele mostra que o estado alterado esta vindo como null como mostra abaixo

Nome MaringasEstado [nome=teste]
Nome GuairaEstado [nome=null] //AQUI O ESTADO QUE FOI ALTERADO
Nome CuritibaEstado [nome=Parana]

o engraçado que no banco de dados ele altera normalmente. E o estado para se retornar null quando eu reinicio o tomcat.
O que pode ser este problema?/

Abaixo os códigos usados por mim

<h:form id="AlterarCidade">
                <p:dialog id="dialog" header="Alterar Estado" widgetVar="dlgAlterar" resizable="false"  
                          width="350" showEffect="clip" hideEffect="fold"> 
                    <p:inputText value="#{cidadeBean.cidade.idCidade}" disabled="true"/>
                    <p:inputText value="#{cidadeBean.cidade.nome}" required="true" requiredMessage="O campo nome esta vazio"/><br/>
                    <p:selectOneMenu id="selecionaEstado" value="#{cidadeBean.estadoSelecionado.idEstado}">
                     		<f:selectItems value="#{cidadeBean.estados}" var="est" itemLabel="#{est.nome}" itemValue="#{est.idEstado}"/>
                     </p:selectOneMenu> 
                    <p:commandButton value="Confirmar" icon="ui-icon-check" action="#{cidadeBean.gravar()}" update=":form" ajax="false"/>
                    <p:commandButton value="Limpar" type="reset" ajax="false"/>
                </p:dialog>
            </h:form>

O meu bean

private Cidade cidade;
private Cidade estadoSelecionado = new Estado();

public void eventoGravar(){
		this.cidade = new Cidade();
	}

  public void alterar() throws DaoException{
		cidade.setEstado(estadoSelecionado);
		dao.salvarOuAlterar(cidade);
        addMessageSucesso("Alterado Com Sucesso");
      
    }

As minhas classes de entidades.

@Entity
public class Estado implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Integer idEstado;
	@Column(length=50, nullable=false, name="nome_estado")
	private String nome;
	@OneToMany(cascade=CascadeType.MERGE, fetch=FetchType.LAZY, mappedBy="estado")
	private Set<Cidade> cidades = new HashSet<Cidade>();
	
	public Estado(){
		
	}
	
	public Estado(Integer id){
		this.idEstado = id;
	}
	
	public String getNome() {
		return nome;
	}
	public void setNome(String nome) {
		this.nome = nome;
	}
	public Integer getIdEstado() {
		return idEstado;
	}
	public void setIdEstado(Integer id) {
		this.idEstado = id;
	}
	public Set<Cidade> getCidades() {
		return Collections.unmodifiableSet(this.cidades);
	}
	public void addCidade(Cidade cidade){
		if(cidade == null){
			throw new IllegalArgumentException("Cidade não pode ser null");
		}
		this.cidades.add(cidade);
		cidade.setEstado(this);
	}
	
	public boolean removeCidade(Cidade cidade){
		if(cidade == null){
			throw new IllegalArgumentException("Cidade não pode ser null");
		}
		if(this.cidades.remove(cidade)){
			cidade.setEstado(null);
			return true;
		}
		return false;
	}
	
		
	
	

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((idEstado == null) ? 0 : idEstado.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Estado other = (Estado) obj;
		if (idEstado == null) {
			if (other.idEstado != null)
				return false;
		} else if (!idEstado.equals(other.idEstado))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Estado [nome=" + nome + "]";
	}
	
	
}


@Entity
public class Cidade implements Serializable{

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Integer idCidade;
	@Column(length=50, name="nome_cidade")
	private String nome;
	@ManyToOne(fetch=FetchType.LAZY, optional=false)
	@JoinColumn(name="estado",referencedColumnName="idestado")
	private Estado estado;
	
	public String getNome() {
		return nome;
	}
	public void setNome(String nome) {
		this.nome = nome;
	}
	public Integer getIdCidade() {
		return idCidade;
	}
	public Estado getEstado() {
		return estado;
	}
	public void setEstado(Estado estado) {
		this.estado = estado;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((idCidade == null) ? 0 : idCidade.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Cidade other = (Cidade) obj;
		if (idCidade == null) {
			if (other.idCidade != null)
				return false;
		} else if (!idCidade.equals(other.idCidade))
			return false;
		return true;
	}
	
	@Override
	public String toString() {
		return "Cidade [nome=" + nome + "]";
	}
	public void setIdCidade(Integer idCidade) {
		this.idCidade = idCidade;
	}
	
	

e a minha listagem do Dao Genérico

@SuppressWarnings("unchecked")
	public List<T> listarTodos() throws DaoException{
        List<T> entities = null;
        String hql = "select object (o) from "+persistenceClass.getSimpleName() + " as o";
        try{
            Query query = getEntityManager().createQuery(hql);
            entities = query.getResultList();
        }catch(Exception e){
            throw new DaoException("Erro ao listar todos os objetos", e);
        }
        return entities;
    }

Agradeço a todos que colaborarem ^^

Na tela você chama o método <p:commandButton value=“Confirmar” icon=“ui-icon-check” action="#{cidadeBean.gravar()}" update=":form" ajax=“false”/> ,

porém colocou os códigos dos métodos eventoGravar e alterar no managed bean.

Obrigado pela atenção, na hora de copiar acabei copiando errado os métodos, agora estão corretos. E o objeto retonando null persiste em aparecer rsrs

Nome MaringasEstado [nome=teste]
Nome GuairaEstado [nome=null] //AQUI O ESTADO QUE FOI ALTERADO
Nome CuritibaEstado [nome=Parana]

Abaixo os códigos usados por mim

<h:form id="AlterarCidade">
                <p:dialog id="dialog" header="Alterar Estado" widgetVar="dlgAlterar" resizable="false"  
                          width="350" showEffect="clip" hideEffect="fold"> 
                    <p:inputText value="#{cidadeBean.cidade.idCidade}" disabled="true"/>
                    <p:inputText value="#{cidadeBean.cidade.nome}" required="true" requiredMessage="O campo nome esta vazio"/><br/>
                    <p:selectOneMenu id="selecionaEstado" value="#{cidadeBean.estadoSelecionado.idEstado}">
                     		<f:selectItems value="#{cidadeBean.estados}" var="est" itemLabel="#{est.nome}" itemValue="#{est.idEstado}"/>
                     </p:selectOneMenu> 
                    <p:commandButton value="Confirmar" icon="ui-icon-check" action="#{cidadeBean.alterar()}" update=":form" ajax="false"/>
                    <p:commandButton value="Limpar" type="reset" ajax="false"/>
                </p:dialog>
            </h:form>

O meu bean

private Cidade cidade = new Cidade();
private Cidade estadoSelecionado = new Estado();


  public void alterar() throws DaoException{
		cidade.setEstado(estadoSelecionado);
		dao.salvarOuAlterar(cidade);
        addMessageSucesso("Alterado Com Sucesso");
      
    }

As minhas classes de entidades.

@Entity
public class Estado implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Integer idEstado;
	@Column(length=50, nullable=false, name="nome_estado")
	private String nome;
	@OneToMany(cascade=CascadeType.MERGE, fetch=FetchType.LAZY, mappedBy="estado")
	private Set<Cidade> cidades = new HashSet<Cidade>();
	
	public Estado(){
		
	}
	
	public Estado(Integer id){
		this.idEstado = id;
	}
	
	public String getNome() {
		return nome;
	}
	public void setNome(String nome) {
		this.nome = nome;
	}
	public Integer getIdEstado() {
		return idEstado;
	}
	public void setIdEstado(Integer id) {
		this.idEstado = id;
	}
	public Set<Cidade> getCidades() {
		return Collections.unmodifiableSet(this.cidades);
	}
	public void addCidade(Cidade cidade){
		if(cidade == null){
			throw new IllegalArgumentException("Cidade não pode ser null");
		}
		this.cidades.add(cidade);
		cidade.setEstado(this);
	}
	
	public boolean removeCidade(Cidade cidade){
		if(cidade == null){
			throw new IllegalArgumentException("Cidade não pode ser null");
		}
		if(this.cidades.remove(cidade)){
			cidade.setEstado(null);
			return true;
		}
		return false;
	}
	
		
	
	

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((idEstado == null) ? 0 : idEstado.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Estado other = (Estado) obj;
		if (idEstado == null) {
			if (other.idEstado != null)
				return false;
		} else if (!idEstado.equals(other.idEstado))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Estado [nome=" + nome + "]";
	}
	
	
}


@Entity
public class Cidade implements Serializable{

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Integer idCidade;
	@Column(length=50, name="nome_cidade")
	private String nome;
	@ManyToOne(fetch=FetchType.LAZY, optional=false)
	@JoinColumn(name="estado",referencedColumnName="idestado")
	private Estado estado;
	
	public String getNome() {
		return nome;
	}
	public void setNome(String nome) {
		this.nome = nome;
	}
	public Integer getIdCidade() {
		return idCidade;
	}
	public Estado getEstado() {
		return estado;
	}
	public void setEstado(Estado estado) {
		this.estado = estado;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((idCidade == null) ? 0 : idCidade.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Cidade other = (Cidade) obj;
		if (idCidade == null) {
			if (other.idCidade != null)
				return false;
		} else if (!idCidade.equals(other.idCidade))
			return false;
		return true;
	}
	
	@Override
	public String toString() {
		return "Cidade [nome=" + nome + "]";
	}
	public void setIdCidade(Integer idCidade) {
		this.idCidade = idCidade;
	}
	
	

e a minha listagem do Dao Genérico

@SuppressWarnings("unchecked")
	public List<T> listarTodos() throws DaoException{
        List<T> entities = null;
        String hql = "select object (o) from "+persistenceClass.getSimpleName() + " as o";
        try{
            Query query = getEntityManager().createQuery(hql);
            entities = query.getResultList();
        }catch(Exception e){
            throw new DaoException("Erro ao listar todos os objetos", e);
        }
        return entities;
    }