Je veux créer un champ BLOB avec mise en veille prolongée/postgresql 9.1.1Mise en veille prolongée 4.1.2.FINAL méthode création LOB Désactivation contextuelle comme createClob() a jeté erreur, champ Blob
Pourquoi je vois ce message dans les journaux :
INFO [org.hibernate.engine.jdbc.internal.LobCreatorBuilder] (MSC service thread 1-5)
HHH000424: Disabling contextual LOB creation as createClob() method threw error :
java.lang.reflect.InvocationTargetException
Je sais que ce n'est pas une erreur.
Hibernate 4.1 Documentation:
"@Lob indicates that the property should be persisted in a Blob or a Clob depending
on the property type: java.sql.Clob, Character[], char[] and java.lang.String will be
persisted in a Clob. java.sql.Blob, Byte[], byte[] and Serializable type will be persisted in a Blob."
Je déclare mon champ comme ceci:
@Lob
@Type(type = "org.hibernate.type.MaterializedClobType")
@Basic(fetch=javax.persistence.FetchType.LAZY)
@Column(name = "`ACTA_CERTIFICACION`")
public byte[] getActacertificacion() {
return actacertificacion;
}
/**
* @param actacertificacion
* @uml.property name="actacertificacion"
*/
public void setActacertificacion(byte[] actacertificacion) {
this.actacertificacion = actacertificacion;
}
Mais dans la base de sa création comme un champ texte:
"ACTA_INCREMENTOSUSTITUCION" text
Que puis-je faire ?, Je veux créer un champ d'octets ou quelque chose de similaire.