5
I have to generate an auto increment of the type "000"+id
, but I can not get to something concrete, my base is this below, I wanted only a light even of how to do, I do not need the answer itself.
@Id
@GeneratedValue
@Column(name = "id", nullable = false)
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
What is your database?
– Anthony Accioly
sql server 2008
– haykou
The idea is to put in the end
BD
, in the field ofID
who’s kindLong
oneString
prefixed000
? Or I misunderstood @haykou– Cold
That, I made another field with the code name but passing public string Getcodigo() { Return code }
– haykou