Changed date to PRIMARY KEY
This commit is contained in:
parent
f0e89184a4
commit
8ffaf525eb
@ -20,6 +20,8 @@ public class UserEvent {
|
||||
@JoinColumn(name = "event_id", referencedColumnName = "id")
|
||||
private Event event;
|
||||
|
||||
@Id
|
||||
@Column(name="date", columnDefinition = "DATE DEFAULT CURRENT_DATE", nullable = false)
|
||||
private Date date;
|
||||
|
||||
/*********************
|
||||
|
@ -1,10 +1,12 @@
|
||||
package com.vpr.server;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.sql.Date;
|
||||
|
||||
public class UserEventId implements Serializable {
|
||||
private long user;
|
||||
private long event;
|
||||
private Date date;
|
||||
|
||||
/*********************
|
||||
* Getter and Setter *
|
||||
@ -25,4 +27,12 @@ public class UserEventId implements Serializable {
|
||||
public void setEvent(long event) {
|
||||
this.event = event;
|
||||
}
|
||||
|
||||
public Date getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(Date date) {
|
||||
this.date = date;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user