Mercurial > lada > lada-server
changeset 444:1a95ca383681
Added annotations to probe id marking the field as generated value.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 11 Feb 2015 12:47:29 +0100 |
parents | 7e8cbc69b784 |
children | c18284cdd101 |
files | src/main/java/de/intevation/lada/model/Probe.java |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/model/Probe.java Wed Feb 11 12:46:29 2015 +0100 +++ b/src/main/java/de/intevation/lada/model/Probe.java Wed Feb 11 12:47:29 2015 +0100 @@ -11,6 +11,8 @@ import java.sql.Timestamp; import javax.persistence.Column; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.MappedSuperclass; import javax.persistence.Table; @@ -25,6 +27,8 @@ private static final long serialVersionUID = 1L; @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + @Column(name="id", unique=true, nullable=false) private Integer id; @Column(name="ba_id")