fixed get WaypointsVisited
This commit is contained in:
@@ -15,10 +15,10 @@ import java.util.Objects;
|
|||||||
@IdClass(WaypointsVisitedId.class)
|
@IdClass(WaypointsVisitedId.class)
|
||||||
public class WaypointsVisitedEntity {
|
public class WaypointsVisitedEntity {
|
||||||
@Id
|
@Id
|
||||||
@Column(name = "userId")
|
@Column(name = "user_id")
|
||||||
private int userId;
|
private int userId;
|
||||||
@Id
|
@Id
|
||||||
@Column(name = "waypointId")
|
@Column(name = "waypoint_id")
|
||||||
private int waypointId;
|
private int waypointId;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -35,12 +35,12 @@ create table if not exists User
|
|||||||
primary key (id)
|
primary key (id)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table if not exists WaypointsVisited
|
create table if not exists Waypoints_visited
|
||||||
(
|
(
|
||||||
userId int not null,
|
user_id int not null,
|
||||||
waypointId int not null,
|
waypoint_id int not null,
|
||||||
foreign key (userId) references User (id),
|
foreign key (user_id) references User (id),
|
||||||
foreign key (waypointId) references Waypoints (id)
|
foreign key (waypoint_id) references Waypoints (id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -102,3 +102,6 @@ values ('luca.bianchi', 'password');
|
|||||||
insert into User (username, password)
|
insert into User (username, password)
|
||||||
values ('giovanni.verdi', 'password');
|
values ('giovanni.verdi', 'password');
|
||||||
insert into User (username, password, admin) values ('Joe', 'admin', true);
|
insert into User (username, password, admin) values ('Joe', 'admin', true);
|
||||||
|
|
||||||
|
insert into Waypoints_visited (user_id, waypoint_id) values (1,1);
|
||||||
|
insert into Waypoints_visited (user_id, waypoint_id) values (2,2);
|
||||||
Reference in New Issue
Block a user