SequenceGenerator Not avaliable for BYTE
----------------------------------------
Key: HHH-4929
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4929
Project: Hibernate Core
Issue Type: Bug
Components: annotations
Reporter: Vinicius Silva
I create a class with this annotation
...
@Entity
@Table(name = "BAIRRO", schema = "BLUEGAS")
@SequenceGenerator(name = "seq",sequenceName="SEQ_BAIRRO")
public class Bairro extends ValueObjectImpl implements java.io.Serializable {
private byte id;
private String nome;
private Character situacao;
private Set<Endereco> enderecos = new HashSet<Endereco>(0);
public Bairro() {
}
public Bairro(byte id) {
this.id = id;
}
public Bairro(byte id, String nome, Character situacao, Set<Endereco> enderecos)
{
this.id = id;
this.nome = nome;
this.situacao = situacao;
this.enderecos = enderecos;
}
@Id
@Column(name = "ID", unique = true, nullable = false, precision = 2, scale =
0)
@GeneratedValue(generator = "seq", strategy = GenerationType.AUTO)
public byte getId() {
return this.id;
}
...
And this Sequence give me error!
org.hibernate.id.IdentifierGenerationException: this id generator generates long, integer,
short or string
Need make this id generator for kind BYTE!!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira