CristianPalmaSola10 11 de jul. de 2012
Ja tentou apenas retirar anotação @Version do mapeamento da coluna ?
juniorsatanas 11 de jul. de 2012
sim
ja tentei por a anotação, ja tirei a anotação
ja tirei o campo ja botei…
problema que no meu banco, nao tenho esse campo…
CristianPalmaSola10 11 de jul. de 2012
Pergunta importante voce precisa desse campo ?
se sim, crie ele no banco
se naum tira isso do bean e resolvido
juniorsatanas 11 de jul. de 2012
pois e mano, nao preciso e nem quero…
mas se tirar o hibernate da um erro, dizendo que o campo nao foi mapeado…
CristianPalmaSola10 11 de jul. de 2012
Posta os arquivos de configuração do hibernate pra dar uma olhada
juniorsatanas 11 de jul. de 2012
qual arquivo vc quer ver ?
CristianPalmaSola10 11 de jul. de 2012
Coloca o hibernate cfg e os bean de entidade que vc esta tendo problema com a anotação
juniorsatanas 11 de jul. de 2012
& lt ; persistence xmlns = "http://java.sun.com/xml/ns/persistence"
xmlns : xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi : schemaLocation = "http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version = "2.0" & gt ;
& lt ; persistence - unit name = "hapvida" transaction - type = "JTA" & gt ;
& lt ; provider & gt ; org . hibernate . ejb . HibernatePersistence & lt ; / provider & gt ;
& lt ; jta - data - source & gt ; java : / inssDS & lt ; / jta - data - source & gt ;
& lt ; properties & gt ;
& lt ; property name = "hibernate.dialect" value = "org.hibernate.dialect.Oracle10gDialect" /& gt ;
& lt ; property name = "hibernate.hbm2ddl.auto" value = "update" /& gt ;
& lt ; property name = "hibernate.show_sql" value = "true" /& gt ;
& lt ; property name = "hibernate.format_sql" value = "true" /& gt ;
& lt ; property name = "hibernate.max_fetch_depth" value = "3" /& gt ;
& lt ; property name = "hibernate.default_batch_fetch_size" value = "4" /& gt ;
& lt ; property name = "hibernate.jdbc.batch_size" value = "20" /& gt ;
& lt ; / properties & gt ;
& lt ; / persistence - unit & gt ;
& lt ; / persistence & gt ;
package br . com . hapvida . entity ;
import javax.persistence.Column ;
import javax.persistence.MappedSuperclass ;
import javax.persistence.Version ;
@MappedSuperclass
public abstract class InssEntity {
// public abstract class InssEntity implements Entity {
/*
private static final long serialVersionUID = 1 L ;
@Version
@Column ( name = "versao" , length = 10 , nullable = false )
private Long versao ;
public Long getVersao () {
return versao ;
}
public void setVersao ( Long versao ) {
this . versao = versao ;
} */
}
package br.com.inss.entity ;
import java.io.Serializable ;
public interface Entity extends Serializable {
}
da uma lida, que vc vai entender melhor e poderar da uma ajuda…
http://www.intertech.com/Blog/Post/Versioning-Optimistic-Locking-in-Hibernate.aspx
Obrigado !
CristianPalmaSola10 11 de jul. de 2012
Posta ai qual a excecao que esta ocorrendo
juniorsatanas 11 de jul. de 2012
RESOLVIDO:
Comentei minha @superclass e pegou !