Я столкнулся с проблемой в моем коде при сопоставлении сущности Employee
с BigDecimal
id для PostgreSql
:
вот сущность:
@Entity
@Table(name = "employe", indexes = {@Index(name = "employe_matricule_IX", columnList = "matricule", unique = true), @Index(name = "employe_telephone_mobile_1_IX", columnList = "telephone_mobile_1", unique = true), @Index(name = "employe_num_cin_IX", columnList = "num_cin", unique = true)})
public class Employe implements Serializable {
/**
* Primary key.
*/
protected static final String PK = "id";
/**
* The optimistic lock. Available via standard bean get/set operations.
*/
@Version
@Column(name = "LOCK_FLAG")
private Integer lockFlag;
/**
* Access method for the lockFlag property.
*
* @return the current value of the lockFlag property
*/
public Integer getLockFlag() {
return lockFlag;
}
/**
* Sets the value of the lockFlag property.
*
* @param aLockFlag the new value of the lockFlag property
*/
public void setLockFlag(Integer aLockFlag) {
lockFlag = aLockFlag;
}
@Id
@Column(unique = true, nullable = false, precision = 6)
private BigDecimal id;
@Column(precision = 6)
private BigDecimal cv;
@Column(length = 254)
private String nom;
@Column(length = 254)
private String prenom;
@Column(length = 254)
private String login;
@Column(length = 254)
private String mp;
@Column(length = 254)
private String mail;
@Column(precision = 6)
private BigDecimal idpointage;
@Column(length = 1)
private boolean actif;
@Column(unique = true, precision = 10)
private int matricule;
@Column(name = "telephone_mobile_1", unique = true, length = 20)
private String telephoneMobile1;
@Column(name = "telephone_mobile_2", length = 20)
private String telephoneMobile2;
@Column(length = 20)
private String telephone;
@Column(name = "date_naissance")
private Date dateNaissance;
@Column(name = "lieu_naissance", length = 256)
private String lieuNaissance;
@Column(name = "sit_famille", length = 1)
private String sitFamille;
@Column(precision = 10)
private int enfant;
@Column(name = "d_stage")
private Date dStage;
@Column(name = "d_finstage") }
HHH000389: не удалось: создать таблицу сотрудников (идентификатор числовой (6, 0) не
null .. ERREUR: la précision NUMERIC 131089 doit être include entre 1
et 1000