-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: null foreign key
PostPosted: Mon Apr 18, 2005 12:20 pm 
Newbie

Joined: Mon Apr 18, 2005 11:12 am
Posts: 4
My problem is relative a foreign keys, when a field (base of fk) I have this problem, observe this line: IntegerType - returning null as column: fk14_8_0_:

The all dump is there:
[DEBUG] SQL - select this_.fk_competencia as fk1_0_, this_.matricula as matricula0_, this_.dv as dv8_0_, this_.nome as nome8_0_, this_.nascimento as nascimento8_0_, this_.fk_competencia as fk1_8_0_, this_.fk_sexo as fk12_8_0_, this_.fk_estado_civil as fk13_8_0_, this_.fk_formacao_profissional as fk14_8_0_, this_.cpf as cpf8_0_, this_.pasep as pasep8_0_, this_.nome_de_guerra as nome8_8_0_, this_.tipo_sanguineo as tipo9_8_0_, this_.pai as pai8_0_, this_.mae as mae8_0_ from cd_servidor this_ where this_.nome like ?
Hibernate: select this_.fk_competencia as fk1_0_, this_.matricula as matricula0_, this_.dv as dv8_0_, this_.nome as nome8_0_, this_.nascimento as nascimento8_0_, this_.fk_competencia as fk1_8_0_, this_.fk_sexo as fk12_8_0_, this_.fk_estado_civil as fk13_8_0_, this_.fk_formacao_profissional as fk14_8_0_, this_.cpf as cpf8_0_, this_.pasep as pasep8_0_, this_.nome_de_guerra as nome8_8_0_, this_.tipo_sanguineo as tipo9_8_0_, this_.pai as pai8_0_, this_.mae as mae8_0_ from cd_servidor this_ where this_.nome like ?
[TRACE] AbstractBatcher - preparing statement
[TRACE] StringType - binding 'GLAUBER%' to parameter: 1
[DEBUG] AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
[TRACE] Loader - processing result set
[DEBUG] Loader - result set row: 0
[TRACE] StringType - returning '200503' as column: fk1_0_
[TRACE] StringType - returning '0000820821' as column: matricula0_
[DEBUG] Loader - result row: EntityKey[br.gov.to.secad.sigesp.model.Servidor#component[competencia,matricula]{competencia=200503, matricula=0000820821}]
[TRACE] Loader - Initializing object from ResultSet: [br.gov.to.secad.sigesp.model.Servidor#component[competencia,matricula]{competencia=200503, matricula=0000820821}]
[TRACE] BasicEntityPersister - Hydrating entity: [br.gov.to.secad.sigesp.model.Servidor#component[competencia,matricula]{competencia=200503, matricula=0000820821}]
[TRACE] StringType - returning '2' as column: dv8_0_
[TRACE] StringType - returning 'GLAUBER DE OLIVEIRA SANTOS' as column: nome8_0_
[TRACE] TimestampType - returning '1969-07-28 21:00:00' as column: nascimento8_0_
[TRACE] StringType - returning '200503' as column: fk1_8_0_
[TRACE] StringType - returning 'M' as column: fk12_8_0_
[TRACE] StringType - returning '200503' as column: fk1_8_0_
[TRACE] IntegerType - returning '2' as column: fk13_8_0_
[TRACE] StringType - returning '200503' as column: fk1_8_0_
[TRACE] IntegerType - returning null as column: fk14_8_0_
[DEBUG] AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
[DEBUG] AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
[TRACE] AbstractBatcher - closing statement
[TRACE] SessionImpl - closing session
[DEBUG] AbstractBatcher - closing JDBC connection (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)
[TRACE] DriverManagerConnectionProvider - returning connection to pool, pool size: 1
[TRACE] JDBCContext - after transaction completion
[TRACE] SessionImpl - after transaction completion
Exception in thread "main" br.gov.to.secad.sigesp.dao.DaoRuntimeException: org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of br.gov.to.secad.sigesp.model.FormacaoProfissionalPk.setCodigo
at br.gov.to.secad.sigesp.dao.BaseDAO.list(BaseDAO.java:50)
at br.gov.to.secad.sigesp.dao.ServidorDAO.main(ServidorDAO.java:20)
Caused by: org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of br.gov.to.secad.sigesp.model.FormacaoProfissionalPk.setCodigo
at org.hibernate.tuple.PojoComponentTuplizer.setPropertyValues(PojoComponentTuplizer.java:63)
at org.hibernate.type.ComponentType.setPropertyValues(ComponentType.java:262)
at org.hibernate.type.ComponentType.resolve(ComponentType.java:446)
at org.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:182)
at org.hibernate.type.ManyToOneType.hydrate(ManyToOneType.java:74)
at org.hibernate.persister.entity.BasicEntityPersister.hydrate(BasicEntityPersister.java:1699)
at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:925)
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:876)
at org.hibernate.loader.Loader.getRow(Loader.java:789)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:295)
at org.hibernate.loader.Loader.doQuery(Loader.java:389)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:208)
at org.hibernate.loader.Loader.doList(Loader.java:1522)
at org.hibernate.loader.Loader.list(Loader.java:1505)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:111)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1256)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:299)
at br.gov.to.secad.sigesp.dao.BaseDAO.list(BaseDAO.java:48)
... 1 more
Caused by: net.sf.cglib.beans.BulkBeanException
at br.gov.to.secad.sigesp.model.FormacaoProfissionalPk$$BulkBeanByCGLIB$$438a4338.setPropertyValues(<generated>)
at org.hibernate.tuple.PojoComponentTuplizer.setPropertyValues(PojoComponentTuplizer.java:59)
... 18 more
Caused by: java.lang.NullPointerException
... 20 more




============
My principal classes are:

======================
======================
package br.gov.to.secad.sigesp.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratorType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.lang.builder.CompareToBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

@Entity
@Table(name = "tb_competencia")
public class Competencia implements Comparable, Serializable {

private static final long serialVersionUID = 3256444715821117488L;

private String competencia;
private boolean liberado;

@Id(generate = GeneratorType.NONE)
@Column(name = "competencia", length = 6, nullable = false)
public String getCompetencia() {
return competencia;
}

public void setCompetencia(String competencia) {
this.competencia = competencia;
}

@Column(name = "liberado", nullable = false)
public boolean isLiberado() {
return liberado;
}

public void setLiberado(boolean liberado) {
this.liberado = liberado;
}

public boolean equals(final Object other) {
if (!(other instanceof Competencia))
return false;
Competencia castOther = (Competencia) other;
return new EqualsBuilder().append(competencia, castOther.competencia)
.append(liberado, castOther.liberado).isEquals();
}

public int hashCode() {
return new HashCodeBuilder(-1903890611, 443900259).append(competencia)
.append(liberado).toHashCode();
}

public String toString() {
return new ToStringBuilder(this).append("competencia", competencia)
.append("liberado", liberado).toString();
}

public int compareTo(final Object other) {
Competencia castOther = (Competencia) other;
return new CompareToBuilder()
.append(competencia, castOther.competencia).append(liberado,
castOther.liberado).toComparison();
}

}

======================
======================

package br.gov.to.secad.sigesp.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.CompareToBuilder;

@Embeddable
public class ServidorPk implements Comparable, Serializable {

private static final long serialVersionUID = 3690759492455511094L;

private String competencia;
private String matricula;

public ServidorPk() {}

public ServidorPk(String competencia, String matricula) {
this.competencia = competencia;
this.matricula = matricula;
}

@Column(name = "fk_competencia", length = 6, nullable = false)
public String getCompetencia() {
return competencia;
}

public void setCompetencia(String competencia) {
this.competencia = competencia;
}

@Column(name = "matricula", length = 10, nullable = false)
public String getMatricula() {
return matricula;
}

public void setMatricula(String matricula) {
this.matricula = matricula;
}

public boolean equals(final Object other) {
if (!(other instanceof ServidorPk))
return false;
ServidorPk castOther = (ServidorPk) other;
return new EqualsBuilder().append(competencia, castOther.competencia)
.append(matricula, castOther.matricula).isEquals();
}

public int hashCode() {
return new HashCodeBuilder(999159279, 2009996783).append(competencia)
.append(matricula).toHashCode();
}

public String toString() {
return new ToStringBuilder(this).append("competencia", competencia)
.append("matricula", matricula).toString();
}

public int compareTo(final Object other) {
ServidorPk castOther = (ServidorPk) other;
return new CompareToBuilder()
.append(competencia, castOther.competencia).append(matricula,
castOther.matricula).toComparison();
}

}

======================
======================

package br.gov.to.secad.sigesp.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratorType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.CompareToBuilder;

@Entity
@Table(name = "cd_servidor")
public class Servidor implements Comparable, Serializable {

private static final long serialVersionUID = 3618977884510106931L;

private ServidorPk pk;
private String dv;
private String nome;
private Date nascimento;
//TODO private Endereco endereco;
private Sexo sexo;
private EstadoCivil estadoCivil;
private FormacaoProfissional formacaoProfissional;
private String cpf;
private String pasep;
private String nomeDeGuerra;
private String tipoSanguineo;
private String pai;
private String mae;
private Competencia competencia;

public Servidor() {}

public Servidor(ServidorPk pk) {
this.pk = pk;
}

@Id(generate = GeneratorType.NONE)
public ServidorPk getPk() {
return pk;
}

public void setPk(ServidorPk pk) {
this.pk = pk;
}

@Column(name = "dv", length = 1, nullable = false)
public String getDv() {
return dv;
}

public void setDv(String dv) {
this.dv = dv;
}

@Column(name = "nome", nullable = false)
public String getNome() {
return nome;
}

public void setNome(String nome) {
this.nome = nome;
}

@Column(name = "nascimento")
public Date getNascimento() {
return nascimento;
}

public void setNascimento(Date nascimento) {
this.nascimento = nascimento;
}

// TODO Endereco

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumns({
@JoinColumn(name = "fk_competencia", referencedColumnName = "fk_competencia", insertable = false, updatable = false),
@JoinColumn(name = "fk_sexo", referencedColumnName = "codigo", insertable = false, updatable = false)
})
public Sexo getSexo() {
return sexo;
}

public void setSexo(Sexo sexo) {
this.sexo = sexo;
}

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumns({
@JoinColumn(name = "fk_competencia", referencedColumnName = "fk_competencia", insertable = false, updatable = false),
@JoinColumn(name = "fk_estado_civil", referencedColumnName = "codigo", insertable = false, updatable = false)
})
public EstadoCivil getEstadoCivil() {
return estadoCivil;
}

public void setEstadoCivil(EstadoCivil estadoCivil) {
this.estadoCivil = estadoCivil;
}


@ManyToOne(fetch = FetchType.LAZY)
@JoinColumns({
@JoinColumn(name = "fk_competencia", referencedColumnName = "fk_competencia", insertable = false, updatable = false, primaryKey = true),
@JoinColumn(name = "fk_formacao_profissional", referencedColumnName = "codigo", insertable = false, updatable = false, primaryKey = true)
})
public FormacaoProfissional getFormacaoProfissional() {
return formacaoProfissional;
}

public void setFormacaoProfissional(FormacaoProfissional formacaoProfissional) {
this.formacaoProfissional = formacaoProfissional;
}


@Column(name = "cpf")
public String getCpf() {
return cpf;
}

public void setCpf(String cpf) {
this.cpf = cpf;
}

@Column(name = "pasep")
public String getPasep() {
return pasep;
}

public void setPasep(String pasep) {
this.pasep = pasep;
}

@Column(name = "nome_de_guerra")
public String getNomeDeGuerra() {
return nomeDeGuerra;
}

public void setNomeDeGuerra(String nomeDeGuerra) {
this.nomeDeGuerra = nomeDeGuerra;
}

@Column(name = "tipo_sanguineo")
public String getTipoSanguineo() {
return tipoSanguineo;
}

public void setTipoSanguineo(String tipoSanguineo) {
this.tipoSanguineo = tipoSanguineo;
}

@Column(name = "pai")
public String getPai() {
return pai;
}

public void setPai(String pai) {
this.pai = pai;
}

@Column(name = "mae")
public String getMae() {
return mae;
}

public void setMae(String mae) {
this.mae = mae;
}

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "fk_competencia",
referencedColumnName = "competencia",
insertable = false, updatable = false)
public Competencia getCompetencia() {
return competencia;
}

public void setCompetencia(Competencia competencia) {
this.competencia = competencia;
}

public boolean equals(final Object other) {
if (!(other instanceof Servidor))
return false;
Servidor castOther = (Servidor) other;
return new EqualsBuilder().append(pk, castOther.pk).append(dv,
castOther.dv).append(nome, castOther.nome).append(nascimento,
castOther.nascimento).append(sexo, castOther.sexo).append(
estadoCivil, castOther.estadoCivil).append(
formacaoProfissional, castOther.formacaoProfissional).append(
cpf, castOther.cpf).append(pasep, castOther.pasep).append(
nomeDeGuerra, castOther.nomeDeGuerra).append(tipoSanguineo,
castOther.tipoSanguineo).append(pai, castOther.pai).append(mae,
castOther.mae).append(competencia, castOther.competencia)
.isEquals();
}

public int hashCode() {
return new HashCodeBuilder(-940600553, -1788175543).append(pk).append(
dv).append(nome).append(nascimento).append(sexo).append(
estadoCivil).append(formacaoProfissional).append(cpf).append(
pasep).append(nomeDeGuerra).append(tipoSanguineo).append(pai)
.append(mae).append(competencia).toHashCode();
}

public String toString() {
return new ToStringBuilder(this).append("pk", pk).append("dv", dv)
.append("nome", nome).append("nascimento", nascimento).append(
"sexo", sexo).append("estadoCivil", estadoCivil)
.append("formacaoProfissional", formacaoProfissional).append(
"cpf", cpf).append("pasep", pasep).append(
"nomeDeGuerra", nomeDeGuerra).append("tipoSanguineo",
tipoSanguineo).append("pai", pai).append("mae", mae)
.append("competencia", competencia).toString();
}

public int compareTo(final Object other) {
Servidor castOther = (Servidor) other;
return new CompareToBuilder().append(pk, castOther.pk).toComparison();
}

}

======================
======================

package br.gov.to.secad.sigesp.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.CompareToBuilder;

@Embeddable
public class FormacaoProfissionalPk implements Comparable, Serializable {

private static final long serialVersionUID = 3257003259137636147L;

private String competencia;
private int codigo;

public FormacaoProfissionalPk() {}

public FormacaoProfissionalPk(String competencia, int codigo) {
this.competencia = competencia;
this.codigo = codigo;
}

@Column(name = "fk_competencia", length = 6, nullable = false)
public String getCompetencia() {
return competencia;
}

public void setCompetencia(String competencia) {
this.competencia = competencia;
}

@Column(name = "codigo", nullable = false)
public int getCodigo() {
return codigo;
}

public void setCodigo(int codigo) {
this.codigo = codigo;
}

public boolean equals(final Object other) {
if (!(other instanceof FormacaoProfissionalPk))
return false;
FormacaoProfissionalPk castOther = (FormacaoProfissionalPk) other;
return new EqualsBuilder().append(competencia, castOther.competencia)
.append(codigo, castOther.codigo).isEquals();
}

public int hashCode() {
return new HashCodeBuilder(-902203053, -396392279).append(competencia)
.append(codigo).toHashCode();
}

public String toString() {
return new ToStringBuilder(this).append("competencia", competencia)
.append("codigo", codigo).toString();
}

public int compareTo(final Object other) {
FormacaoProfissionalPk castOther = (FormacaoProfissionalPk) other;
return new CompareToBuilder()
.append(competencia, castOther.competencia).append(codigo,
castOther.codigo).toComparison();
}

}

======================
======================

package br.gov.to.secad.sigesp.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratorType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.CompareToBuilder;

@Entity
@Table(name = "tb_formacao_profissional")
public class FormacaoProfissional implements Comparable, Serializable {

private static final long serialVersionUID = 4050481235665170995L;

private FormacaoProfissionalPk pk;
private String descricao;
private Competencia competencia;

public FormacaoProfissional() {}

public FormacaoProfissional(FormacaoProfissionalPk pk) {
this.pk = pk;
}

public FormacaoProfissional(FormacaoProfissionalPk pk, String descricao) {
this(pk);
this.descricao = descricao;
}

@Id(generate = GeneratorType.NONE)
public FormacaoProfissionalPk getPk() {
return pk;
}

public void setPk(FormacaoProfissionalPk pk) {
this.pk = pk;
}

@Column(name = "descricao", nullable = false )
public String getDescricao() {
return descricao;
}

public void setDescricao(String descricao) {
this.descricao = descricao;
}

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "fk_competencia",
referencedColumnName = "competencia",
insertable = false, updatable = false)
public Competencia getCompetencia() {
return competencia;
}

public void setCompetencia(Competencia competencia) {
this.competencia = competencia;
}

public boolean equals(final Object other) {
if (!(other instanceof FormacaoProfissional))
return false;
FormacaoProfissional castOther = (FormacaoProfissional) other;
return new EqualsBuilder().append(pk, castOther.pk).append(descricao,
castOther.descricao).append(competencia, castOther.competencia)
.isEquals();
}

public int hashCode() {
return new HashCodeBuilder(-1785578025, 1262374925).append(pk).append(
descricao).append(competencia).toHashCode();
}

public String toString() {
return new ToStringBuilder(this).append("pk", pk).append("descricao",
descricao).append("competencia", competencia).toString();
}

public int compareTo(final Object other) {
FormacaoProfissional castOther = (FormacaoProfissional) other;
return new CompareToBuilder().append(pk, castOther.pk).toComparison();
}

}


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 18, 2005 1:54 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Any chance you shorten it to a small case. This is way too long for a forum request :-)

_________________
Emmanuel


Top
 Profile  
 
 Post subject: Small case
PostPosted: Mon Apr 18, 2005 2:17 pm 
Newbie

Joined: Mon Apr 18, 2005 11:12 am
Posts: 4
The Case:
1) All my mappings have composite primary keys, and the first one are 'competencia';
2) All the foreign keys are 'competencia' and another field.

Sample Scenario:
Servidor: composite-pk (competencia, matricula), fields..., formacaoProfissional, ...
formacaoProfissional is foreign key of (FormacaoProfissional).

FormacaoProfissional: composite-pk (competencia, matricula), fields

The Problem:
- When the field formacaoProfissional in Servidor is null are handled exception: org.hibernate.PropertyAccessException
because it try map (competencia, null) and it's viole pk of FormacaoProfissional.


Top
 Profile  
 
 Post subject: problem rewrited
PostPosted: Tue Apr 19, 2005 9:10 am 
Newbie

Joined: Mon Apr 18, 2005 11:12 am
Posts: 4
When I use composed foreign key and one of the elements is null occurs the following problem.

Tables
Code:
CREATE TABLE cd_servidor__conselho
(
  fk_competencia varchar(6) NOT NULL,
  matricula varchar(10) NOT NULL,
  numero text,
  regiao varchar(10),
  fk_uf varchar(2),
  CONSTRAINT pk_cd_servidor__conselho PRIMARY KEY (fk_competencia, matricula),
  CONSTRAINT fk_cd_servidor__conselho FOREIGN KEY (fk_competencia, matricula) REFERENCES cd_servidor (fk_competencia, matricula) ON UPDATE RESTRICT ON DELETE RESTRICT,
  CONSTRAINT fk_cd_servidor__conselho__uf FOREIGN KEY (fk_competencia, fk_uf) REFERENCES tb_uf (fk_competencia, sigla) ON UPDATE RESTRICT ON DELETE RESTRICT
)
WITHOUT OIDS;


Code:
CREATE TABLE tb_uf
(
  fk_competencia varchar(6) NOT NULL,
  sigla varchar(2) NOT NULL,
  nome text NOT NULL,
  fk_ibge_municipio varchar(7),
  CONSTRAINT pk_tb_uf PRIMARY KEY (fk_competencia, sigla),
  CONSTRAINT fk_tb_uf__competencia FOREIGN KEY (fk_competencia) REFERENCES tb_competencia (competencia) ON UPDATE RESTRICT ON DELETE RESTRICT
)
WITHOUT OIDS;

Code:
fk_competencia;matricula;numero;regiao;fk_uf
'200503';'0000820277';'1231';'123';null

Special note for fk_uf who is null

Hibernate version:
3.0.x

Mapping documents:
Code:
package br.gov.to.secad.sigesp.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratorType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.lang.builder.CompareToBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

@Entity
@Table(name = "tb_competencia")
public class Competencia implements Comparable, Serializable {

   private static final long serialVersionUID = 3256444715821117488L;
   
   private String competencia;
   private boolean liberado;
   
   @Id(generate = GeneratorType.NONE)
   @Column(name = "competencia", length = 6, nullable = false)
   public String getCompetencia() {
      return competencia;
   }
   
   public void setCompetencia(String competencia) {
      this.competencia = competencia;
   }
   
   @Column(name = "liberado", nullable = false)
   public boolean isLiberado() {
      return liberado;
   }
   
   public void setLiberado(boolean liberado) {
      this.liberado = liberado;
   }
   
   public boolean equals(final Object other) {
      if (!(other instanceof Competencia))
         return false;
      Competencia castOther = (Competencia) other;
      return new EqualsBuilder().append(competencia, castOther.competencia)
            .append(liberado, castOther.liberado).isEquals();
   }

   public int hashCode() {
      return new HashCodeBuilder(-1903890611, 443900259).append(competencia)
            .append(liberado).toHashCode();
   }

   public String toString() {
      return new ToStringBuilder(this).append("competencia", competencia)
            .append("liberado", liberado).toString();
   }

   public int compareTo(final Object other) {
      Competencia castOther = (Competencia) other;
      return new CompareToBuilder()
            .append(competencia, castOther.competencia).append(liberado,
                  castOther.liberado).toComparison();
   }
   
}


Code:
package br.gov.to.secad.sigesp.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.CompareToBuilder;

@Embeddable
public class ServidorPk implements Comparable, Serializable {

   private static final long serialVersionUID = 3690759492455511094L;
   
   private String competencia;
   private String matricula;
   
   public ServidorPk() {}
   
   public ServidorPk(String competencia, String matricula) {
      this.competencia = competencia;
      this.matricula = matricula;
   }
   
   @Column(name = "fk_competencia", length = 6, nullable = false)
   public String getCompetencia() {
      return competencia;
   }
   
   public void setCompetencia(String competencia) {
      this.competencia = competencia;
   }
   
   @Column(name = "matricula", length = 10, nullable = false)
   public String getMatricula() {
      return matricula;
   }
   
   public void setMatricula(String matricula) {
      this.matricula = matricula;
   }

   public boolean equals(final Object other) {
      if (!(other instanceof ServidorPk))
         return false;
      ServidorPk castOther = (ServidorPk) other;
      return new EqualsBuilder().append(competencia, castOther.competencia)
            .append(matricula, castOther.matricula).isEquals();
   }

   public int hashCode() {
      return new HashCodeBuilder(999159279, 2009996783).append(competencia)
            .append(matricula).toHashCode();
   }

   public String toString() {
      return new ToStringBuilder(this).append("competencia", competencia)
            .append("matricula", matricula).toString();
   }

   public int compareTo(final Object other) {
      ServidorPk castOther = (ServidorPk) other;
      return new CompareToBuilder()
            .append(competencia, castOther.competencia).append(matricula,
                  castOther.matricula).toComparison();
   }
   
}


Code:
package br.gov.to.secad.sigesp.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratorType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.apache.commons.lang.builder.CompareToBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

@Entity
@Table(name = "cd_servidor__conselho")
public class Servidor_Conselho implements Comparable, Serializable {

   private static final long serialVersionUID = 3979266936947093815L;
   
   private ServidorPk pk;
   private String numero;
   private String regiao;
   private UF uf;
   
   public Servidor_Conselho() {}
   
   public Servidor_Conselho(ServidorPk pk) {
      this.pk = pk;
   }

   @Id(generate = GeneratorType.NONE)
   public ServidorPk getPk() {
      return pk;
   }

   public void setPk(ServidorPk pk) {
      this.pk = pk;
   }
   
   @Column(name = "numero")
   public String getNumero() {
      return numero;
   }

   public void setNumero(String numero) {
      this.numero = numero;
   }

   @Column(name = "regiao")
   public String getRegiao() {
      return regiao;
   }

   public void setRegiao(String regiao) {
      this.regiao = regiao;
   }

   @ManyToOne(fetch = FetchType.LAZY)
   @JoinColumns({
      @JoinColumn(name = "fk_competencia", referencedColumnName = "fk_competencia", insertable = false, updatable = false, nullable = true),
      @JoinColumn(name = "fk_uf", referencedColumnName = "sigla", insertable = false, updatable = false, nullable = true)
   })
   public UF getUf() {
      return uf;
   }

   public void setUf(UF uf) {
      this.uf = uf;
   }

   public boolean equals(final Object other) {
      if (!(other instanceof Servidor_Conselho))
         return false;
      Servidor_Conselho castOther = (Servidor_Conselho) other;
      return new EqualsBuilder().append(pk, castOther.pk).append(numero,
            castOther.numero).append(regiao, castOther.regiao).append(uf,
            castOther.uf).isEquals();
   }

   public int hashCode() {
      return new HashCodeBuilder(-1016027211, -41647177).append(pk).append(
            numero).append(regiao).append(uf).toHashCode();
   }

   public String toString() {
      return new ToStringBuilder(this).append("pk", pk).append("numero",
            numero).append("regiao", regiao).append("uf", uf).toString();
   }

   public int compareTo(final Object other) {
      Servidor_Conselho castOther = (Servidor_Conselho) other;
      return new CompareToBuilder().append(pk, castOther.pk).toComparison();
   }
   
}


Code:
package br.gov.to.secad.sigesp.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.CompareToBuilder;

@Embeddable
public class UFPk implements Comparable, Serializable {

   private static final long serialVersionUID = 3257001047280007223L;
   
   private String competencia;
   private String sigla;

   public UFPk() {}
   
   public UFPk(String competencia, String codigo) {
      this.competencia = competencia;
      this.sigla = codigo;
   }
   
   @Column(name = "fk_competencia", length = 6, nullable = false)
   public String getCompetencia() {
      return competencia;
   }
   
   public void setCompetencia(String competencia) {
      this.competencia = competencia;
   }
   
   @Column(name = "sigla", length = 2, nullable = false)
   public String getSigla() {
      return sigla;
   }
   
   public void setSigla(String sigla) {
      this.sigla = sigla;
   }

   public boolean equals(final Object other) {
      if (!(other instanceof UFPk))
         return false;
      UFPk castOther = (UFPk) other;
      return new EqualsBuilder().append(competencia, castOther.competencia)
            .append(sigla, castOther.sigla).isEquals();
   }

   public int hashCode() {
      return new HashCodeBuilder(-1118174027, 1733489829).append(competencia)
            .append(sigla).toHashCode();
   }

   public String toString() {
      return new ToStringBuilder(this).append("competencia", competencia)
            .append("codigo", sigla).toString();
   }

   public int compareTo(final Object other) {
      UFPk castOther = (UFPk) other;
      return new CompareToBuilder()
            .append(competencia, castOther.competencia).append(sigla,
                  castOther.sigla).toComparison();
   }   
}


Code:
package br.gov.to.secad.sigesp.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratorType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.CompareToBuilder;

@Entity
@Table(name = "tb_uf")
public class UF implements Comparable, Serializable {
   
   private static final long serialVersionUID = 3256440300560791859L;
   private UFPk pk;
   private String nome;
   private String ibge; // TODO Criar tabela do IBGE
   private Competencia competencia;
   
   public UF() {}
   
   public UF(UFPk pk) {
      this.pk = pk;
   }
   
   public UF(UFPk pk, String descricao, String ibge) {
      this(pk);
      this.nome = descricao;
      this.ibge = ibge;
   }
   
   @Id(generate = GeneratorType.NONE)
   public UFPk getPk() {
      return pk;
   }

   public void setPk(UFPk pk) {
      this.pk = pk;
   }

   @Column(name = "nome", nullable = false)
   public String getNome() {
      return nome;
   }

   public void setNome(String nome) {
      this.nome = nome;
   }
   
   @Column(name = "fk_ibge_municipio", length = 7, nullable = true)
   public String getIbge() {
      return ibge;
   }

   public void setIbge(String ibge) {
      this.ibge = ibge;
   }

   @ManyToOne(fetch = FetchType.LAZY)
   @JoinColumn(name = "fk_competencia",
         referencedColumnName = "competencia",
         insertable = false, updatable = false)
   public Competencia getCompetencia() {
      return competencia;
   }

   public void setCompetencia(Competencia competencia) {
      this.competencia = competencia;
   }

   public boolean equals(final Object other) {
      if (!(other instanceof UF))
         return false;
      UF castOther = (UF) other;
      return new EqualsBuilder().append(pk, castOther.pk).append(nome,
            castOther.nome).append(ibge, castOther.ibge).append(
            competencia, castOther.competencia).isEquals();
   }

   public int hashCode() {
      return new HashCodeBuilder(311981621, -500465239).append(pk).append(
            nome).append(ibge).append(competencia).toHashCode();
   }

   public String toString() {
      return new ToStringBuilder(this).append("pk", pk).append("descricao",
            nome).append("ibge", ibge).append("competencia",
            competencia).toString();
   }

   public int compareTo(final Object other) {
      UF castOther = (UF) other;
      return new CompareToBuilder().append(pk, castOther.pk).toComparison();
   }   
}


Full stack trace of any exception that occurs:
[code]
[DEBUG] AnnotationBinder - Processing annotations of br.gov.to.secad.sigesp.model.Servidor_Conselho.uf
[DEBUG] Ejb3Column - Binding column fk_competencia unique false
[DEBUG] Ejb3Column - Binding column fk_uf unique false
[DEBUG] AnnotationBinder - Building property uf
[DEBUG] AnnotationBinder - Cascading uf with none
[DEBUG] Configuration - Preparing to build session factory with filters : {}
[DEBUG] AnnotationConfiguration - processing manytoone fk mappings
[INFO] Configuration - processing extends queue
[INFO] Configuration - processing collection mappings
[INFO] Configuration - processing association property references
[INFO] Configuration - processing foreign key constraints
[DEBUG] Configuration - resolving reference to class: br.gov.to.secad.sigesp.model.Competencia
[DEBUG] Configuration - resolving reference to class: br.gov.to.secad.sigesp.model.Sexo
[DEBUG] Configuration - resolving reference to class: br.gov.to.secad.sigesp.model.EstadoCivil
[DEBUG] Configuration - resolving reference to class: br.gov.to.secad.sigesp.model.FormacaoProfissional
[DEBUG] Configuration - resolving reference to class: br.gov.to.secad.sigesp.model.UF
[DEBUG] Configuration - resolving reference to class: br.gov.to.secad.sigesp.model.Competencia
[DEBUG] Configuration - resolving reference to class: br.gov.to.secad.sigesp.model.Competencia
[DEBUG] Configuration - resolving reference to class: br.gov.to.secad.sigesp.model.Competencia
[DEBUG] Configuration - resolving reference to class: br.gov.to.secad.sigesp.model.Competencia
[DEBUG] Configuration - resolving reference to class: br.gov.to.secad.sigesp.model.Competencia
[DEBUG] Configuration - resolving reference to class: br.gov.to.secad.sigesp.model.Competencia
[DEBUG] Configuration - resolving reference to class: br.gov.to.secad.sigesp.model.Competencia
[INFO] Dialect - Using dialect: org.hibernate.dialect.PostgreSQLDialect
[TRACE] SQLExceptionConverterFactory - Using dialect defined converter
[INFO] SettingsFactory - Default batch fetch size: 1
[INFO] SettingsFactory - Generate SQL with comments: enabled
[INFO] SettingsFactory - Order SQL updates by primary key: disabled
[INFO] SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[INFO] ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
[INFO] SettingsFactory - Query language substitutions: {}
[INFO] DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
[INFO] DriverManagerConnectionProvider - Hibernate connection pool size: 20
[INFO] DriverManagerConnectionProvider - autocommit mode: false
[INFO] DriverManagerConnectionProvider - using driver: org.postgresql.Driver at URL: jdbc:postgresql:sigesp
[INFO] DriverManagerConnectionProvider - connection properties: {user=sigesp, password=sigesp}
[TRACE] DriverManagerConnectionProvider - total checked-out connections: 0
[DEBUG] DriverManagerConnectionProvider - opening new JDBC connection
[DEBUG] DriverManagerConnectionProvider - created connection to: jdbc:postgresql:sigesp, Isolation Level: 2
[TRACE] DriverManagerConnectionProvider - returning connection to pool, pool size: 1
[INFO] SettingsFactory - JDBC batch size: 15
[INFO] SettingsFactory - JDBC batch updates for versioned data: disabled
[INFO] SettingsFactory - Scrollable result sets: enabled
[DEBUG] SettingsFactory - Wrap result sets: disabled
[INFO] SettingsFactory - JDBC3 getGeneratedKeys(): disabled
[INFO] TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
[INFO] TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
[INFO] SettingsFactory - Automatic flush during beforeCompletion(): disabled
[INFO] SettingsFactory - Automatic session close at end of transaction: disabled
[INFO] SettingsFactory - Second-level cache: enabled
[INFO] SettingsFactory - Query cache: disabled
[INFO] SettingsFactory - Cache provider: org.hibernate.cache.EhCacheProvider
[INFO] SettingsFactory - Optimize cache for minimal puts: disabled
[INFO] SettingsFactory - Structured second-level cache entries: enabled
[INFO] SettingsFactory - Echoing all SQL to stdout
[INFO] SettingsFactory - Statistics: enabled
[INFO] SettingsFactory - Deleted entity synthetic identifier rollback: disabled
[INFO] SettingsFactory - Default entity-mode: pojo
[INFO] SessionFactoryImpl - building session factory
[DEBUG] SessionFactoryImpl - Session factory constructed with filter configurations : {}
[DEBUG] SessionFactoryImpl - instantiating session factory with properties: {hibernate.connection.password=sigesp, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=C:\Arquivos de programas\Java\jdk1.5.0_02\jre\bin, java.vm.version=1.5.0_02-b09, hibernate.connection.username=sigesp, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=BR, sun.os.patch.level=Service Pack 2, java.vm.specification.name=Java Virtual Machine Specification, user.dir=C:\java\workspace\sigesp, java.runtime.version=1.5.0_02-b09, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\Arquivos de programas\Java\jdk1.5.0_02\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\GLAUBE~1\CONFIG~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, sun.jnu.encoding=Cp1252, java.library.path=C:\Arquivos de programas\Java\jdk1.5.0_02\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arquivos de programas\SecureCRT\;C:\ARQUIV~1\SecureFX;C:\Arquivos de programas\Java\jdk1.5.0_02\bin;C:\java\apache-ant-1.6.2\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arquivos de programas\SecureCRT\;C:\ARQUIV~1\SecureFX;C:\Arquivos de programas\Java\jdk1.5.0_02\bin;C:\java\apache-ant-1.6.2\bin;C:\java\njawin12\newjawin\lib;C:\java\ocx;C:\java\groovy-1.0-beta-9\BIN;C:\Arquivos de programas\GnuWin32\bin, hibernate.generate_statistics=true, java.specification.name=Java Platform API Specification, java.class.version=49.0, sun.management.compiler=HotSpot Client Compiler, os.version=5.1, user.home=C:\Documents and Settings\Glauber Kliemann, user.timezone=, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.5, hibernate.connection.driver_class=org.postgresql.Driver, user.name=Glauber Kliemann, java.class.path=C:\java\workspace\sigesp\bin;C:\java\commons-configuration-1.1\commons-configuration-1.1.jar;C:\java\commons-collections-3.1\commons-collections-3.1.jar;C:\java\commons-lang-2.0\commons-lang-2.0.jar;C:\java\commons-logging-1.0.4\commons-logging.jar;C:\java\xerces-2_6_2\xercesImpl.jar;C:\java\xerces-2_6_2\xml-apis.jar;C:\java\hibernate-annotations-3.0beta1\hibernate-annotations.jar;C:\java\hibernate-annotations-3.0beta1\lib\ejb-3.0-edr2.jar;C:\java\hibernate-3.0\hibernate3.jar;C:\java\hibernate-3.0\lib\xerces-2.6.2.jar;C:\java\hibernate-3.0\lib\antlr-2.7.5H3.jar;C:\java\hibernate-3.0\lib\asm.jar;C:\java\hibernate-3.0\lib\asm-attrs.jar;C:\java\hibernate-3.0\lib\c3p0-0.8.5.2.jar;C:\java\hibernate-3.0\lib\cglib-2.1.jar;C:\java\hibernate-3.0\lib\dom4j-1.6.jar;C:\java\hibernate-3.0\lib\ehcache-1.1.jar;C:\java\hibernate-3.0\lib\jta.jar;C:\java\hibernate-3.0\lib\jaxen-1.1-beta-4.jar;C:\Arquivos de programas\PostgreSQL\8.0\jdbc\postgresql-8.0.309.jdbc3.jar, hibernate.use_sql_comments=true, hibernate.show_sql=true, java.vm.specification.version=1.0, java.home=C:\Arquivos de programas\Java\jdk1.5.0_02\jre, sun.arch.data.model=32, hibernate.connection.url=jdbc:postgresql:sigesp, hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect, user.language=pt, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, hibernate.cglib.use_reflection_optimizer=false, java.vm.info=mixed mode, java.version=1.5.0_02, java.ext.dirs=C:\Arquivos de programas\Java\jdk1.5.0_02\jre\lib\ext, sun.boot.class.path=C:\Arquivos de programas\Java\jdk1.5.0_02\jre\lib\rt.jar;C:\Arquivos de programas\Java\jdk1.5.0_02\jre\lib\i18n.jar;C:\Arquivos de programas\Java\jdk1.5.0_02\jre\lib\sunrsasign.jar;C:\Arquivos de programas\Java\jdk1.5.0_02\jre\lib\jsse.jar;C:\Arquivos de programas\Java\jdk1.5.0_02\jre\lib\jce.jar;C:\Arquivos de programas\Java\jdk1.5.0_02\jre\lib\charsets.jar;C:\Arquivos de programas\Java\jdk1.5.0_02\jre\classes, java.vendor=Sun Microsystems Inc., file.separator=\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.desktop=windows, sun.cpu.isalist=}
[DEBUG] CacheManager - Creating new CacheManager with default config
[DEBUG] CacheManager - Configuring ehcache from classpath.
[WARN] Configurator - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/java/hibernate-3.0/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
[DEBUG] Configuration$DiskStore - Disk Store Path: C:\DOCUME~1\GLAUBE~1\CONFIG~1\Temp\
[DEBUG] BasicEntityPersister - Static SQL for entity: br.gov.to.secad.sigesp.model.Sexo
[DEBUG] BasicEntityPersister - Version select: /*get version br.gov.to.secad.sigesp.model.Sexo*/select fk_competencia, codigo from tb_sexo where fk_competencia =? and codigo =?
[DEBUG] BasicEntityPersister - Snapshot select: /*get current state br.gov.to.secad.sigesp.model.Sexo*/select sexo_.fk_competencia, sexo_.codigo, sexo_.descricao as descricao6_ from tb_sexo sexo_ where sexo_.fk_competencia=? and sexo_.codigo=?
[DEBUG] BasicEntityPersister - Insert 0: /*insert br.gov.to.secad.sigesp.model.Sexo*/insert into tb_sexo (descricao, fk_competencia, codigo) values (?, ?, ?)
[DEBUG] BasicEntityPersister - Update 0: /*update br.gov.to.secad.sigesp.model.Sexo*/update tb_sexo set descricao=? where fk_competencia=? and codigo=?
[DEBUG] BasicEntityPersister - Delete 0: /*delete br.gov.to.secad.sigesp.model.Sexo*/delete from tb_sexo where fk_competencia=? and codigo=?
[DEBUG] BasicEntityPersister - Static SQL for entity: br.gov.to.secad.sigesp.model.Servidor_CarteiraNacionalDeHabilitacao
[DEBUG] BasicEntityPersister - Version select: /*get version br.gov.to.secad.sigesp.model.Servidor_CarteiraNacionalDeHabilitacao*/select fk_competencia, matricula from cd_servidor__cnh where fk_competencia =? and matricula =?
[DEBUG] BasicEntityPersister - Snapshot select: /*get current state br.gov.to.secad.sigesp.model.Servidor_CarteiraNacionalDeHabilitacao*/select servidor_c_.fk_competencia, servidor_c_.matricula, servidor_c_.numero as numero10_, servidor_c_.categoria as categoria10_ from cd_servidor__cnh servidor_c_ where servidor_c_.fk_competencia=? and servidor_c_.matricula=?
[DEBUG] BasicEntityPersister - Insert 0: /*insert br.gov.to.secad.sigesp.model.Servidor_CarteiraNacionalDeHabilitacao*/insert into cd_servidor__cnh (numero, categoria, fk_competencia, matricula) values (?, ?, ?, ?)
[DEBUG] BasicEntityPersister - Update 0: /*update br.gov.to.secad.sigesp.model.Servidor_CarteiraNacionalDeHabilitacao*/update cd_servidor__cnh set numero=?, categoria=? where fk_competencia=? and matricula=?
[DEBUG] BasicEntityPersister - Delete 0: /*delete br.gov.to.secad.sigesp.model.Servidor_CarteiraNacionalDeHabilitacao*/delete from cd_servidor__cnh where fk_competencia=? and matricula=?
[DEBUG] BasicEntityPersister - Static SQL for entity: br.gov.to.secad.sigesp.model.Escolaridade
[DEBUG] BasicEntityPersister - Version select: /*get version br.gov.to.secad.sigesp.model.Escolaridade*/select fk_competencia, codigo from tb_escolaridade where fk_competencia =? and codigo =?
[DEBUG] BasicEntityPersister - Snapshot select: /*get current state br.gov.to.secad.sigesp.model.Escolaridade*/select escolarida_.fk_competencia, escolarida_.codigo, escolarida_.descricao as descricao1_ from tb_escolaridade escolarida_ where escolarida_.fk_competencia=? and escolarida_.codigo=?
[DEBUG] BasicEntityPersister - Insert 0: /*insert br.gov.to.secad.sigesp.model.Escolaridade*/insert into tb_escolaridade (descricao, fk_competencia, codigo) values (?, ?, ?)
[DEBUG] BasicEntityPersister - Update 0: /*update br.gov.to.secad.sigesp.model.Escolaridade*/update tb_escolaridade set descricao=? where fk_competencia=? and codigo=?
[DEBUG] BasicEntityPersister - Delete 0: /*delete br.gov.to.secad.sigesp.model.Escolaridade*/delete from tb_escolaridade where fk_competencia=? and codigo=?
[DEBUG] BasicEntityPersister - Static SQL for entity: br.gov.to.secad.sigesp.model.Servidor_CertificadoMilitar
[DEBUG] BasicEntityPersister - Version select: /*get version br.gov.to.secad.sigesp.model.Servidor_CertificadoMilitar*/select fk_competencia, matricula from cd_servidor__cm where fk_competencia =? and matricula =?
[DEBUG] BasicEntityPersister - Snapshot select: /*get current state br.gov.to.secad.sigesp.model.Servidor_CertificadoMilitar*/select servidor_c_.fk_competencia, servidor_c_.matricula, servidor_c_.numero as numero9_, servidor_c_.categoria as categoria9_, servidor_c_.regiao as regiao9_, servidor_c_.emissao as emissao9_ from cd_servidor__cm servidor_c_ where servidor_c_.fk_competencia=? and servidor_c_.matricula=?
[DEBUG] BasicEntityPersister - Insert 0: /*insert br.gov.to.secad.sigesp.model.Servidor_CertificadoMilitar*/insert into cd_servidor__cm (numero, categoria, regiao, emissao, fk_competencia, matricula) values (?, ?, ?, ?, ?, ?)
[DEBUG] BasicEntityPersister - Update 0: /*update br.gov.to.secad.sigesp.model.Servidor_CertificadoMilitar*/update cd_servidor__cm set numero=?, categoria=?, regiao=?, emissao=? where fk_competencia=? and matricula=?
[DEBUG] BasicEntityPersister - Delete 0: /*delete br.gov.to.secad.sigesp.model.Servidor_CertificadoMilitar*/delete from cd_servidor__cm where fk_competencia=? and matricula=?
[DEBUG] BasicEntityPersister - Static SQL for entity: br.gov.to.secad.sigesp.model.UF
[DEBUG] BasicEntityPersister - Version select: /*get version br.gov.to.secad.sigesp.model.UF*/select fk_competencia, sigla from tb_uf where fk_competencia =? and sigla =?
[DEBUG] BasicEntityPersister - Snapshot select: /*get current state br.gov.to.secad.sigesp.model.UF*/select uf_.fk_competencia, uf_.sigla, uf_.nome as nome7_, uf_.fk_ibge_municipio as fk4_7_ from tb_uf uf_ where uf_.fk_competencia=? and uf_.sigla=?
[DEBUG] BasicEntityPersister - Insert 0: /*insert br.gov.to.secad.sigesp.model.UF*/insert into tb_uf (nome, fk_ibge_municipio, fk_competencia, sigla) values (?, ?, ?, ?)
[DEBUG] BasicEntityPersister - Update 0: /*update br.gov.to.secad.sigesp.model.UF*/update tb_uf set nome=?, fk_ibge_municipio=? where fk_competencia=? and sigla=?
[DEBUG] BasicEntityPersister - Delete 0: /*delete br.gov.to.secad.sigesp.model.UF*/delete from tb_uf where fk_competencia=? and sigla=?
[DEBUG] BasicEntityPersister - Static SQL for entity: br.gov.to.secad.sigesp.model.Pais
[DEBUG] BasicEntityPersister - Version select: /*get version br.gov.to.secad.sigesp.model.Pais*/select fk_competencia, codigo from tb_pais where fk_competencia =? and codigo =?
[DEBUG] BasicEntityPersister - Snapshot select: /*get current state br.gov.to.secad.sigesp.model.Pais*/select pais_.fk_competencia, pais_.codigo, pais_.descricao as descricao5_ from tb_pais pais_ where pais_.fk_competencia=? and pais_.codigo=?
[DEBUG] BasicEntityPersister - Insert 0: /*insert br.gov.to.secad.sigesp.model.Pais*/insert into tb_pais (descricao, fk_competencia, codigo) values (?, ?, ?)
[DEBUG] BasicEntityPersister - Update 0: /*update br.gov.to.secad.sigesp.model.Pais*/update tb_pais set descricao=? where fk_competencia=? and codigo=?
[DEBUG] BasicEntityPersister - Delete 0: /*delete br.gov.to.secad.sigesp.model.Pais*/delete from tb_pais where fk_competencia=? and codigo=?
[DEBUG] BasicEntityPersister - Static SQL for entity: br.gov.to.secad.sigesp.model.FormacaoProfissional
[DEBUG] BasicEntityPersister - Version select: /*get version br.gov.to.secad.sigesp.model.FormacaoProfissional*/select fk_competencia, codigo from tb_formacao_profissional where fk_competencia =? and codigo =?
[DEBUG] BasicEntityPersister - Snapshot select: /*get current state br.gov.to.secad.sigesp.model.FormacaoProfissional*/select formacaopr_.fk_competencia, formacaopr_.codigo, formacaopr_.descricao as descricao3_ from tb_formacao_profissional formacaopr_ where formacaopr_.fk_competencia=? and formacaopr_.codigo=?
[DEBUG] BasicEntityPersister - Insert 0: /*insert br.gov.to.secad.sigesp.model.FormacaoProfissional*/insert into tb_formacao_profissional (descricao, fk_competencia, codigo) values (?, ?, ?)
[DEBUG] BasicEntityPersister - Update 0: /*update br.gov.to.secad.sigesp.model.FormacaoProfissional*/update tb_formacao_profissional set descricao=? where fk_competencia=? and codigo=?
[DEBUG] BasicEntityPersister - Delete 0: /*delete br.gov.to.secad.sigesp.model.FormacaoProfissional*/delete from tb_formacao_profissional where fk_competencia=? and codigo=?
[DEBUG] BasicEntityPersister - Static SQL for entity: br.gov.to.secad.sigesp.model.EstadoCivil
[DEBUG] BasicEntityPersister - Version select: /*get version br.gov.to.secad.sigesp.model.EstadoCivil*/select fk_competencia, codigo from tb_estado_civil where fk_competencia =? and codigo =?
[DEBUG] BasicEntityPersister - Snapshot select: /*get current state br.gov.to.secad.sigesp.model.EstadoCivil*/select estadocivi_.fk_competencia, estadocivi_.codigo, estadocivi_.descricao as descricao2_ from tb_estado_civil estadocivi_ where estadocivi_.fk_competencia=? and estadocivi_.codigo=?
[DEBUG] BasicEntityPersister - Insert 0: /*insert br.gov.to.secad.sigesp.model.EstadoCivil*/insert into tb_estado_civil (descricao, fk_competencia, codigo) values (?, ?, ?)
[DEBUG] BasicEntityPersister - Update 0: /*update br.gov.to.secad.sigesp.model.EstadoCivil*/update tb_estado_civil set descricao=? where fk_competencia=? and codigo=?
[DEBUG] BasicEntityPersister - Delete 0: /*delete br.gov.to.secad.sigesp.model.EstadoCivil*/delete from tb_estado_civil where fk_competencia=? and codigo=?
[DEBUG] BasicEntityPersister - Static SQL for entity: br.gov.to.secad.sigesp.model.Servidor_Conselho
[DEBUG] BasicEntityPersister - Version select: /*get version br.gov.to.secad.sigesp.model.Servidor_Conselho*/select fk_competencia, matricula from cd_servidor__conselho where fk_competencia =? and matricula =?
[DEBUG] BasicEntityPersister - Snapshot select: /*get current state br.gov.to.secad.sigesp.model.Servidor_Conselho*/select servidor_c_.fk_competencia, servidor_c_.matricula, servidor_c_.numero as numero11_, servidor_c_.regiao as regiao11_ from cd_servidor__conselho servidor_c_ where servidor_c_.fk_competencia=? and servidor_c_.matricula=?
[DEBUG] BasicEntityPersister - Insert 0: /*insert br.gov.to.secad.sigesp.model.Servidor_Conselho*/insert into cd_servidor__conselho (numero, regiao, fk_competencia, matricula) values (?, ?, ?, ?)
[DEBUG] BasicEntityPersister - Update 0: /*update br.gov.to.secad.sigesp.model.Servidor_Conselho*/update cd_servidor__conselho set numero=?, regiao=? where fk_competencia=? and matricula=?
[DEBUG] BasicEntityPersister - Delete 0: /*delete br.gov.to.secad.sigesp.model.Servidor_Conselho*/delete from cd_servidor__conselho where fk_competencia=? and matricula=?
[DEBUG] BasicEntityPersister - Static SQL for entity: br.gov.to.secad.sigesp.model.Servidor
[DEBUG] BasicEntityPersister - Version select: /*get version br.gov.to.secad.sigesp.model.Servidor*/select fk_competencia, matricula from cd_servidor where fk_competencia =? and matricula =?
[DEBUG] BasicEntityPersister - Snapshot select: /*get current state br.gov.to.secad.sigesp.model.Servidor*/select servidor_.fk_competencia, servidor_.matricula, servidor_.dv as dv8_, servidor_.nome as nome8_, servidor_.nascimento as nascimento8_, servidor_.cpf as cpf8_, servidor_.pasep as pasep8_, servidor_.nome_de_guerra as nome8_8_, servidor_.tipo_sanguineo as tipo9_8_, servidor_.pai as pai8_, servidor_.mae as mae8_ from cd_servidor servidor_ where servidor_.fk_competencia=? and servidor_.matricula=?
[DEBUG] BasicEntityPersister - Insert 0: /*insert br.gov.to.secad.sigesp.model.Servidor*/insert into cd_servidor (dv, nome, nascimento, cpf, pasep, nome_de_guerra, tipo_sanguineo, pai, mae, fk_competencia, matricula) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
[DEBUG] BasicEntityPersister - Update 0: /*update br.gov.to.secad.sigesp.model.Servidor*/update cd_servidor set dv=?, nome=?, nascimento=?, cpf=?, pasep=?, nome_de_guerra=?, tipo_sanguineo=?, pai=?, mae=? where fk_competencia=? and matricula=?
[DEBUG] BasicEntityPersister - Delete 0: /*delete br.gov.to.secad.sigesp.model.Servidor*/delete from cd_servidor where fk_competencia=? and matricula=?
[DEBUG] BasicEntityPersister - Static SQL for entity: br.gov.to.secad.sigesp.model.Nacionalidade
[DEBUG] BasicEntityPersister - Version select: /*get version br.gov.to.secad.sigesp.model.Nacionalidade*/select fk_competencia, codigo from tb_nacionalidade where fk_competencia =? and codigo =?
[DEBUG] BasicEntityPersister - Snapshot select: /*get current state br.gov.to.secad.sigesp.model.Nacionalidade*/select nacionalid_.fk_competencia, nacionalid_.codigo, nacionalid_.descricao as descricao4_ from tb_nacionalidade nacionalid_ where nacionalid_.fk_competencia=? and nacionalid_.codigo=?
[DEBUG] BasicEntityPersister - Insert 0: /*insert br.gov.to.secad.sigesp.model.Nacionalidade*/insert into tb_nacionalidade (descricao, fk_competencia, codigo) values (?, ?, ?)
[DEBUG] BasicEntityPersister - Update 0: /*update br.gov.to.secad.sigesp.model.Nacionalidade*/update tb_nacionalidade set descricao=? where fk_competencia=? and codigo=?
[DEBUG] BasicEntityPersister - Delete 0: /*delete br.gov.to.secad.sigesp.model.Nacionalidade*/delete from tb_nacionalidade where fk_competencia=? and codigo=?
[DEBUG] BasicEntityPersister - Static SQL for entity: br.gov.to.secad.sigesp.model.Competencia
[DEBUG] BasicEntityPersister - Version select: /*get version br.gov.to.secad.sigesp.model.Competencia*/select competencia from tb_competencia where competencia =?
[DEBUG] BasicEntityPersister - Snapshot select: /*get current state br.gov.to.secad.sigesp.model.Competencia*/select competenci_.competencia, competenci_.liberado as liberado0_ from tb_competencia competenci_ where competenci_.competencia=?
[DEBUG] BasicEntityPersister - Insert 0: /*insert br.gov.to.secad.sigesp.model.Competencia*/insert into tb_competencia (liberado, competencia) values (?, ?)
[DEBUG] BasicEntityPersister - Update 0: /*update br.gov.to.secad.sigesp.model.Competencia*/update tb_competencia set liberado=? where competencia=?
[DEBUG] BasicEntityPersister - Delete 0: /*delete br.gov.to.secad.sigesp.model.Competencia*/delete from tb_competencia where competencia=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Sexo: /*load br.gov.to.secad.sigesp.model.Sexo*/select sexo0_.fk_competencia as fk1_0_, sexo0_.codigo as codigo0_, sexo0_.fk_competencia as fk1_6_0_, sexo0_.descricao as descricao6_0_ from tb_sexo sexo0_ where sexo0_.fk_competencia=? and sexo0_.codigo=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Sexo: /*load br.gov.to.secad.sigesp.model.Sexo*/select sexo0_.fk_competencia as fk1_0_, sexo0_.codigo as codigo0_, sexo0_.fk_competencia as fk1_6_0_, sexo0_.descricao as descricao6_0_ from tb_sexo sexo0_ where sexo0_.fk_competencia=? and sexo0_.codigo=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Sexo: /*load br.gov.to.secad.sigesp.model.Sexo*/select sexo0_.fk_competencia as fk1_0_, sexo0_.codigo as codigo0_, sexo0_.fk_competencia as fk1_6_0_, sexo0_.descricao as descricao6_0_ from tb_sexo sexo0_ where sexo0_.fk_competencia=? and sexo0_.codigo=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Sexo: /*load br.gov.to.secad.sigesp.model.Sexo*/select sexo0_.fk_competencia as fk1_0_, sexo0_.codigo as codigo0_, sexo0_.fk_competencia as fk1_6_0_, sexo0_.descricao as descricao6_0_ from tb_sexo sexo0_ where sexo0_.fk_competencia=? and sexo0_.codigo=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Escolaridade: /*load br.gov.to.secad.sigesp.model.Escolaridade*/select escolarida0_.fk_competencia as fk1_0_, escolarida0_.codigo as codigo0_, escolarida0_.fk_competencia as fk1_1_0_, escolarida0_.descricao as descricao1_0_ from tb_escolaridade escolarida0_ where escolarida0_.fk_competencia=? and escolarida0_.codigo=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Escolaridade: /*load br.gov.to.secad.sigesp.model.Escolaridade*/select escolarida0_.fk_competencia as fk1_0_, escolarida0_.codigo as codigo0_, escolarida0_.fk_competencia as fk1_1_0_, escolarida0_.descricao as descricao1_0_ from tb_escolaridade escolarida0_ where escolarida0_.fk_competencia=? and escolarida0_.codigo=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Escolaridade: /*load br.gov.to.secad.sigesp.model.Escolaridade*/select escolarida0_.fk_competencia as fk1_0_, escolarida0_.codigo as codigo0_, escolarida0_.fk_competencia as fk1_1_0_, escolarida0_.descricao as descricao1_0_ from tb_escolaridade escolarida0_ where escolarida0_.fk_competencia=? and escolarida0_.codigo=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Escolaridade: /*load br.gov.to.secad.sigesp.model.Escolaridade*/select escolarida0_.fk_competencia as fk1_0_, escolarida0_.codigo as codigo0_, escolarida0_.fk_competencia as fk1_1_0_, escolarida0_.descricao as descricao1_0_ from tb_escolaridade escolarida0_ where escolarida0_.fk_competencia=? and escolarida0_.codigo=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Servidor_CarteiraNacionalDeHabilitacao: /*load br.gov.to.secad.sigesp.model.Servidor_CarteiraNacionalDeHabilitacao*/select servidor_c0_.fk_competencia as fk1_0_, servidor_c0_.matricula as matricula0_, servidor_c0_.numero as numero10_0_, servidor_c0_.categoria as categoria10_0_ from cd_servidor__cnh servidor_c0_ where servidor_c0_.fk_competencia=? and servidor_c0_.matricula=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Servidor_CarteiraNacionalDeHabilitacao: /*load br.gov.to.secad.sigesp.model.Servidor_CarteiraNacionalDeHabilitacao*/select servidor_c0_.fk_competencia as fk1_0_, servidor_c0_.matricula as matricula0_, servidor_c0_.numero as numero10_0_, servidor_c0_.categoria as categoria10_0_ from cd_servidor__cnh servidor_c0_ where servidor_c0_.fk_competencia=? and servidor_c0_.matricula=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Servidor_CarteiraNacionalDeHabilitacao: /*load br.gov.to.secad.sigesp.model.Servidor_CarteiraNacionalDeHabilitacao*/select servidor_c0_.fk_competencia as fk1_0_, servidor_c0_.matricula as matricula0_, servidor_c0_.numero as numero10_0_, servidor_c0_.categoria as categoria10_0_ from cd_servidor__cnh servidor_c0_ where servidor_c0_.fk_competencia=? and servidor_c0_.matricula=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Servidor_CarteiraNacionalDeHabilitacao: /*load br.gov.to.secad.sigesp.model.Servidor_CarteiraNacionalDeHabilitacao*/select servidor_c0_.fk_competencia as fk1_0_, servidor_c0_.matricula as matricula0_, servidor_c0_.numero as numero10_0_, servidor_c0_.categoria as categoria10_0_ from cd_servidor__cnh servidor_c0_ where servidor_c0_.fk_competencia=? and servidor_c0_.matricula=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.UF: /*load br.gov.to.secad.sigesp.model.UF*/select uf0_.fk_competencia as fk1_0_, uf0_.sigla as sigla0_, uf0_.nome as nome7_0_, uf0_.fk_competencia as fk1_7_0_, uf0_.fk_ibge_municipio as fk4_7_0_ from tb_uf uf0_ where uf0_.fk_competencia=? and uf0_.sigla=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.UF: /*load br.gov.to.secad.sigesp.model.UF*/select uf0_.fk_competencia as fk1_0_, uf0_.sigla as sigla0_, uf0_.nome as nome7_0_, uf0_.fk_competencia as fk1_7_0_, uf0_.fk_ibge_municipio as fk4_7_0_ from tb_uf uf0_ where uf0_.fk_competencia=? and uf0_.sigla=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.UF: /*load br.gov.to.secad.sigesp.model.UF*/select uf0_.fk_competencia as fk1_0_, uf0_.sigla as sigla0_, uf0_.nome as nome7_0_, uf0_.fk_competencia as fk1_7_0_, uf0_.fk_ibge_municipio as fk4_7_0_ from tb_uf uf0_ where uf0_.fk_competencia=? and uf0_.sigla=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.UF: /*load br.gov.to.secad.sigesp.model.UF*/select uf0_.fk_competencia as fk1_0_, uf0_.sigla as sigla0_, uf0_.nome as nome7_0_, uf0_.fk_competencia as fk1_7_0_, uf0_.fk_ibge_municipio as fk4_7_0_ from tb_uf uf0_ where uf0_.fk_competencia=? and uf0_.sigla=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Servidor_CertificadoMilitar: /*load br.gov.to.secad.sigesp.model.Servidor_CertificadoMilitar*/select servidor_c0_.fk_competencia as fk1_0_, servidor_c0_.matricula as matricula0_, servidor_c0_.numero as numero9_0_, servidor_c0_.categoria as categoria9_0_, servidor_c0_.regiao as regiao9_0_, servidor_c0_.emissao as emissao9_0_ from cd_servidor__cm servidor_c0_ where servidor_c0_.fk_competencia=? and servidor_c0_.matricula=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Servidor_CertificadoMilitar: /*load br.gov.to.secad.sigesp.model.Servidor_CertificadoMilitar*/select servidor_c0_.fk_competencia as fk1_0_, servidor_c0_.matricula as matricula0_, servidor_c0_.numero as numero9_0_, servidor_c0_.categoria as categoria9_0_, servidor_c0_.regiao as regiao9_0_, servidor_c0_.emissao as emissao9_0_ from cd_servidor__cm servidor_c0_ where servidor_c0_.fk_competencia=? and servidor_c0_.matricula=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Servidor_CertificadoMilitar: /*load br.gov.to.secad.sigesp.model.Servidor_CertificadoMilitar*/select servidor_c0_.fk_competencia as fk1_0_, servidor_c0_.matricula as matricula0_, servidor_c0_.numero as numero9_0_, servidor_c0_.categoria as categoria9_0_, servidor_c0_.regiao as regiao9_0_, servidor_c0_.emissao as emissao9_0_ from cd_servidor__cm servidor_c0_ where servidor_c0_.fk_competencia=? and servidor_c0_.matricula=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Servidor_CertificadoMilitar: /*load br.gov.to.secad.sigesp.model.Servidor_CertificadoMilitar*/select servidor_c0_.fk_competencia as fk1_0_, servidor_c0_.matricula as matricula0_, servidor_c0_.numero as numero9_0_, servidor_c0_.categoria as categoria9_0_, servidor_c0_.regiao as regiao9_0_, servidor_c0_.emissao as emissao9_0_ from cd_servidor__cm servidor_c0_ where servidor_c0_.fk_competencia=? and servidor_c0_.matricula=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Pais: /*load br.gov.to.secad.sigesp.model.Pais*/select pais0_.fk_competencia as fk1_0_, pais0_.codigo as codigo0_, pais0_.fk_competencia as fk1_5_0_, pais0_.descricao as descricao5_0_ from tb_pais pais0_ where pais0_.fk_competencia=? and pais0_.codigo=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Pais: /*load br.gov.to.secad.sigesp.model.Pais*/select pais0_.fk_competencia as fk1_0_, pais0_.codigo as codigo0_, pais0_.fk_competencia as fk1_5_0_, pais0_.descricao as descricao5_0_ from tb_pais pais0_ where pais0_.fk_competencia=? and pais0_.codigo=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Pais: /*load br.gov.to.secad.sigesp.model.Pais*/select pais0_.fk_competencia as fk1_0_, pais0_.codigo as codigo0_, pais0_.fk_competencia as fk1_5_0_, pais0_.descricao as descricao5_0_ from tb_pais pais0_ where pais0_.fk_competencia=? and pais0_.codigo=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Pais: /*load br.gov.to.secad.sigesp.model.Pais*/select pais0_.fk_competencia as fk1_0_, pais0_.codigo as codigo0_, pais0_.fk_competencia as fk1_5_0_, pais0_.descricao as descricao5_0_ from tb_pais pais0_ where pais0_.fk_competencia=? and pais0_.codigo=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.FormacaoProfissional: /*load br.gov.to.secad.sigesp.model.FormacaoProfissional*/select formacaopr0_.fk_competencia as fk1_0_, formacaopr0_.codigo as codigo0_, formacaopr0_.fk_competencia as fk1_3_0_, formacaopr0_.descricao as descricao3_0_ from tb_formacao_profissional formacaopr0_ where formacaopr0_.fk_competencia=? and formacaopr0_.codigo=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.FormacaoProfissional: /*load br.gov.to.secad.sigesp.model.FormacaoProfissional*/select formacaopr0_.fk_competencia as fk1_0_, formacaopr0_.codigo as codigo0_, formacaopr0_.fk_competencia as fk1_3_0_, formacaopr0_.descricao as descricao3_0_ from tb_formacao_profissional formacaopr0_ where formacaopr0_.fk_competencia=? and formacaopr0_.codigo=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.FormacaoProfissional: /*load br.gov.to.secad.sigesp.model.FormacaoProfissional*/select formacaopr0_.fk_competencia as fk1_0_, formacaopr0_.codigo as codigo0_, formacaopr0_.fk_competencia as fk1_3_0_, formacaopr0_.descricao as descricao3_0_ from tb_formacao_profissional formacaopr0_ where formacaopr0_.fk_competencia=? and formacaopr0_.codigo=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.FormacaoProfissional: /*load br.gov.to.secad.sigesp.model.FormacaoProfissional*/select formacaopr0_.fk_competencia as fk1_0_, formacaopr0_.codigo as codigo0_, formacaopr0_.fk_competencia as fk1_3_0_, formacaopr0_.descricao as descricao3_0_ from tb_formacao_profissional formacaopr0_ where formacaopr0_.fk_competencia=? and formacaopr0_.codigo=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.EstadoCivil: /*load br.gov.to.secad.sigesp.model.EstadoCivil*/select estadocivi0_.fk_competencia as fk1_0_, estadocivi0_.codigo as codigo0_, estadocivi0_.fk_competencia as fk1_2_0_, estadocivi0_.descricao as descricao2_0_ from tb_estado_civil estadocivi0_ where estadocivi0_.fk_competencia=? and estadocivi0_.codigo=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.EstadoCivil: /*load br.gov.to.secad.sigesp.model.EstadoCivil*/select estadocivi0_.fk_competencia as fk1_0_, estadocivi0_.codigo as codigo0_, estadocivi0_.fk_competencia as fk1_2_0_, estadocivi0_.descricao as descricao2_0_ from tb_estado_civil estadocivi0_ where estadocivi0_.fk_competencia=? and estadocivi0_.codigo=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.EstadoCivil: /*load br.gov.to.secad.sigesp.model.EstadoCivil*/select estadocivi0_.fk_competencia as fk1_0_, estadocivi0_.codigo as codigo0_, estadocivi0_.fk_competencia as fk1_2_0_, estadocivi0_.descricao as descricao2_0_ from tb_estado_civil estadocivi0_ where estadocivi0_.fk_competencia=? and estadocivi0_.codigo=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.EstadoCivil: /*load br.gov.to.secad.sigesp.model.EstadoCivil*/select estadocivi0_.fk_competencia as fk1_0_, estadocivi0_.codigo as codigo0_, estadocivi0_.fk_competencia as fk1_2_0_, estadocivi0_.descricao as descricao2_0_ from tb_estado_civil estadocivi0_ where estadocivi0_.fk_competencia=? and estadocivi0_.codigo=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Servidor_Conselho: /*load br.gov.to.secad.sigesp.model.Servidor_Conselho*/select servidor_c0_.fk_competencia as fk1_0_, servidor_c0_.matricula as matricula0_, servidor_c0_.numero as numero11_0_, servidor_c0_.regiao as regiao11_0_, servidor_c0_.fk_competencia as fk1_11_0_, servidor_c0_.fk_uf as fk5_11_0_ from cd_servidor__conselho servidor_c0_ where servidor_c0_.fk_competencia=? and servidor_c0_.matricula=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Servidor_Conselho: /*load br.gov.to.secad.sigesp.model.Servidor_Conselho*/select servidor_c0_.fk_competencia as fk1_0_, servidor_c0_.matricula as matricula0_, servidor_c0_.numero as numero11_0_, servidor_c0_.regiao as regiao11_0_, servidor_c0_.fk_competencia as fk1_11_0_, servidor_c0_.fk_uf as fk5_11_0_ from cd_servidor__conselho servidor_c0_ where servidor_c0_.fk_competencia=? and servidor_c0_.matricula=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Servidor_Conselho: /*load br.gov.to.secad.sigesp.model.Servidor_Conselho*/select servidor_c0_.fk_competencia as fk1_0_, servidor_c0_.matricula as matricula0_, servidor_c0_.numero as numero11_0_, servidor_c0_.regiao as regiao11_0_, servidor_c0_.fk_competencia as fk1_11_0_, servidor_c0_.fk_uf as fk5_11_0_ from cd_servidor__conselho servidor_c0_ where servidor_c0_.fk_competencia=? and servidor_c0_.matricula=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Servidor_Conselho: /*load br.gov.to.secad.sigesp.model.Servidor_Conselho*/select servidor_c0_.fk_competencia as fk1_0_, servidor_c0_.matricula as matricula0_, servidor_c0_.numero as numero11_0_, servidor_c0_.regiao as regiao11_0_, servidor_c0_.fk_competencia as fk1_11_0_, servidor_c0_.fk_uf as fk5_11_0_ from cd_servidor__conselho servidor_c0_ where servidor_c0_.fk_competencia=? and servidor_c0_.matricula=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Servidor: /*load br.gov.to.secad.sigesp.model.Servidor*/select servidor0_.fk_competencia as fk1_0_, servidor0_.matricula as matricula0_, servidor0_.dv as dv8_0_, servidor0_.nome as nome8_0_, servidor0_.nascimento as nascimento8_0_, servidor0_.fk_competencia as fk1_8_0_, servidor0_.fk_sexo as fk12_8_0_, servidor0_.fk_estado_civil as fk13_8_0_, servidor0_.fk_formacao_profissional as fk14_8_0_, servidor0_.cpf as cpf8_0_, servidor0_.pasep as pasep8_0_, servidor0_.nome_de_guerra as nome8_8_0_, servidor0_.tipo_sanguineo as tipo9_8_0_, servidor0_.pai as pai8_0_, servidor0_.mae as mae8_0_ from cd_servidor servidor0_ where servidor0_.fk_competencia=? and servidor0_.matricula=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Servidor: /*load br.gov.to.secad.sigesp.model.Servidor*/select servidor0_.fk_competencia as fk1_0_, servidor0_.matricula as matricula0_, servidor0_.dv as dv8_0_, servidor0_.nome as nome8_0_, servidor0_.nascimento as nascimento8_0_, servidor0_.fk_competencia as fk1_8_0_, servidor0_.fk_sexo as fk12_8_0_, servidor0_.fk_estado_civil as fk13_8_0_, servidor0_.fk_formacao_profissional as fk14_8_0_, servidor0_.cpf as cpf8_0_, servidor0_.pasep as pasep8_0_, servidor0_.nome_de_guerra as nome8_8_0_, servidor0_.tipo_sanguineo as tipo9_8_0_, servidor0_.pai as pai8_0_, servidor0_.mae as mae8_0_ from cd_servidor servidor0_ where servidor0_.fk_competencia=? and servidor0_.matricula=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Servidor: /*load br.gov.to.secad.sigesp.model.Servidor*/select servidor0_.fk_competencia as fk1_0_, servidor0_.matricula as matricula0_, servidor0_.dv as dv8_0_, servidor0_.nome as nome8_0_, servidor0_.nascimento as nascimento8_0_, servidor0_.fk_competencia as fk1_8_0_, servidor0_.fk_sexo as fk12_8_0_, servidor0_.fk_estado_civil as fk13_8_0_, servidor0_.fk_formacao_profissional as fk14_8_0_, servidor0_.cpf as cpf8_0_, servidor0_.pasep as pasep8_0_, servidor0_.nome_de_guerra as nome8_8_0_, servidor0_.tipo_sanguineo as tipo9_8_0_, servidor0_.pai as pai8_0_, servidor0_.mae as mae8_0_ from cd_servidor servidor0_ where servidor0_.fk_competencia=? and servidor0_.matricula=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Servidor: /*load br.gov.to.secad.sigesp.model.Servidor*/select servidor0_.fk_competencia as fk1_0_, servidor0_.matricula as matricula0_, servidor0_.dv as dv8_0_, servidor0_.nome as nome8_0_, servidor0_.nascimento as nascimento8_0_, servidor0_.fk_competencia as fk1_8_0_, servidor0_.fk_sexo as fk12_8_0_, servidor0_.fk_estado_civil as fk13_8_0_, servidor0_.fk_formacao_profissional as fk14_8_0_, servidor0_.cpf as cpf8_0_, servidor0_.pasep as pasep8_0_, servidor0_.nome_de_guerra as nome8_8_0_, servidor0_.tipo_sanguineo as tipo9_8_0_, servidor0_.pai as pai8_0_, servidor0_.mae as mae8_0_ from cd_servidor servidor0_ where servidor0_.fk_competencia=? and servidor0_.matricula=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Nacionalidade: /*load br.gov.to.secad.sigesp.model.Nacionalidade*/select nacionalid0_.fk_competencia as fk1_0_, nacionalid0_.codigo as codigo0_, nacionalid0_.fk_competencia as fk1_4_0_, nacionalid0_.descricao as descricao4_0_ from tb_nacionalidade nacionalid0_ where nacionalid0_.fk_competencia=? and nacionalid0_.codigo=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Nacionalidade: /*load br.gov.to.secad.sigesp.model.Nacionalidade*/select nacionalid0_.fk_competencia as fk1_0_, nacionalid0_.codigo as codigo0_, nacionalid0_.fk_competencia as fk1_4_0_, nacionalid0_.descricao as descricao4_0_ from tb_nacionalidade nacionalid0_ where nacionalid0_.fk_competencia=? and nacionalid0_.codigo=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Nacionalidade: /*load br.gov.to.secad.sigesp.model.Nacionalidade*/select nacionalid0_.fk_competencia as fk1_0_, nacionalid0_.codigo as codigo0_, nacionalid0_.fk_competencia as fk1_4_0_, nacionalid0_.descricao as descricao4_0_ from tb_nacionalidade nacionalid0_ where nacionalid0_.fk_competencia=? and nacionalid0_.codigo=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Nacionalidade: /*load br.gov.to.secad.sigesp.model.Nacionalidade*/select nacionalid0_.fk_competencia as fk1_0_, nacionalid0_.codigo as codigo0_, nacionalid0_.fk_competencia as fk1_4_0_, nacionalid0_.descricao as descricao4_0_ from tb_nacionalidade nacionalid0_ where nacionalid0_.fk_competencia=? and nacionalid0_.codigo=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Competencia: /*load br.gov.to.secad.sigesp.model.Competencia*/select competenci0_.competencia as competen1_0_, competenci0_.liberado as liberado0_0_ from tb_competencia competenci0_ where competenci0_.competencia=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Competencia: /*load br.gov.to.secad.sigesp.model.Competencia*/select competenci0_.competencia as competen1_0_, competenci0_.liberado as liberado0_0_ from tb_competencia competenci0_ where competenci0_.competencia=?
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Competencia: /*load br.gov.to.secad.sigesp.model.Competencia*/select competenci0_.competencia as competen1_0_, competenci0_.liberado as liberado0_0_ from tb_competencia competenci0_ where competenci0_.competencia=? for update
[DEBUG] EntityLoader - Static select for entity br.gov.to.secad.sigesp.model.Competencia: /*load br.gov.to.secad.sigesp.model.Competencia*/select competenci0_.competencia as competen1_0_, competenci0_.liberado as liberado0_0_ from tb_competencia competenci0_ where competenci0_.competencia=? for update
[DEBUG] SessionFactoryObjectFactory - initializing class SessionFactoryObjectFactory
[DEBUG] SessionFactoryObjectFactory - registered: 8af983f3035a885601035a885a830000 (unnamed)
[INFO] SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
[DEBUG] SessionFactoryImpl - instantiated session factory
[INFO] SessionFactoryImpl - Checking 0 named queries
[DEBUG] SessionImpl - opened session at timestamp: 4562597540605952
[DEBUG] AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
[DEBUG] AbstractBatcher - opening JDBC connection
[TRACE] DriverManagerConnectionProvider - total checked-out connections: 0
[TRACE] DriverManagerConnectionProvider - using pooled JDBC connection, pool size: 0
[DEBUG] SQL - /*criteria query*/select this_.fk_competencia as fk1_0_, this_.matricula as matricula0_, this_.dv as dv8_0_, this_.nome as nome8_0_, this_.nascimento as nascimento8_0_, this_.fk_competencia as fk1_8_0_, this_.fk_sexo as fk12_8_0_, this_.fk_estado_civil as fk13_8_0_, this_.fk_formacao_profissional as fk14_8_0_, this_.cpf as cpf8_0_, this_.pasep as pasep8_0_, this_.nome_de_guerra as nome8_8_0_, this_.tipo_sanguineo as tipo9_8_0_, this_.pai as pai8_0_, this_.mae as mae8_0_ from cd_servidor this_ where this_.nome=?Hibernate: /*criteria query*/select this_.fk_competencia as fk1_0_, this_.matricula as matricula0_, this_.dv as dv8_0_, this_.nome as nome8_0_, this_.nascimento as nascimento8_0_, this_.fk_competencia as fk1_8_0_, this_.fk_sexo as fk12_8_0_, this_.fk_estado_civil as fk13_8_0_, this_.fk_formacao_profissional as fk14_8_0_, this_.cpf as cpf8_0_, this_.pasep as pasep8_0_, this_.nome_de_guerra as nome8_8_0_, this_.tipo_sanguineo as tipo9_8_0_, this_.pai as pai8_0_, this_.mae as mae8_0_ from cd_servidor this_ where this_.nome=?

[TRACE] AbstractBatcher - preparing statement
[TRACE] StringType - binding 'GLAUBER KLIEMANN' to parameter: 1
[DEBUG] AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
[TRACE] Loader - processing result set
[DEBUG] Loader - result set row: 0
[TRACE] StringType - returning '200503' as column: fk1_0_
[TRACE] StringType - returning '0000820277' as column: matricula0_
[DEBUG] Loader - result row: EntityKey[br.gov.to.secad.sigesp.model.Servidor#component[competencia,matricula]{competencia=200503, matricula=0000820277}]
[TRACE] Loader - Initializing object from ResultSet: [br.gov.to.secad.sigesp.model.Servidor#component[competencia,matricula]{competencia=200503, matricula=0000820277}]
[TRACE] BasicEntityPersister - Hydrating entity: [br.gov.to.secad.sigesp.model.Servidor#component[competencia,matricula]{competencia=200503, matricula=0000820277}]
[TRACE] StringType - returning '0' as column: dv8_0_
[TRACE] StringType - returning 'GLAUBER KLIEMANN' as column: nome8_0_
[TRACE] TimestampType - returning '1974-08-15 21:00:00' as column: nascimento8_0_
[TRACE] StringType - returning '200503' as column: fk1_8_0_
&#


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 19, 2005 2:29 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I meant a simplified (minimal) version of you classes reproducing the problem. It will help you and us

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.