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
nullHibernate 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_