Index: src/main/java/it/finki/tinki/service/impl/AccountServiceImpl.java
===================================================================
--- src/main/java/it/finki/tinki/service/impl/AccountServiceImpl.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/service/impl/AccountServiceImpl.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -2,4 +2,7 @@
 
 import it.finki.tinki.model.Address;
+import it.finki.tinki.model.Jobs.Internship;
+import it.finki.tinki.model.Jobs.Job;
+import it.finki.tinki.model.Jobs.Project;
 import it.finki.tinki.model.Skill;
 import it.finki.tinki.model.Users.Account;
@@ -10,9 +13,8 @@
 import it.finki.tinki.model.exception.InvalidArgumentsException;
 import it.finki.tinki.model.exception.UserExistsException;
-import it.finki.tinki.repository.AddressRepository;
-import it.finki.tinki.repository.CompanyRepository;
-import it.finki.tinki.repository.TeamRepository;
-import it.finki.tinki.repository.UserRepository;
+import it.finki.tinki.repository.*;
 import it.finki.tinki.service.AccountService;
+import it.finki.tinki.service.MatchmakerService;
+import it.finki.tinki.service.WorkService;
 import org.springframework.stereotype.Service;
 
@@ -28,10 +30,25 @@
     TeamRepository teamRepository;
     CompanyRepository companyRepository;
+    JobRepository jobRepository;
+    ProjectRepository projectRepository;
+    InternshipRepository internshipRepository;
+    MatchmakerService matchmakerService;
 
-    public AccountServiceImpl(AddressRepository addressRepository, UserRepository userRepository, TeamRepository teamRepository, CompanyRepository companyRepository) {
+    public AccountServiceImpl(AddressRepository addressRepository,
+                              UserRepository userRepository,
+                              TeamRepository teamRepository,
+                              CompanyRepository companyRepository,
+                              MatchmakerService matchmakerService,
+                              JobRepository jobRepository,
+                              ProjectRepository projectRepository,
+                              InternshipRepository internshipRepository) {
         this.addressRepository = addressRepository;
         this.userRepository = userRepository;
         this.teamRepository = teamRepository;
         this.companyRepository = companyRepository;
+        this.jobRepository = jobRepository;
+        this.projectRepository = projectRepository;
+        this.internshipRepository = internshipRepository;
+        this.matchmakerService = matchmakerService;
     }
 
@@ -65,5 +82,29 @@
 
         User u = new User(email, password, name, AccountType.USER, surname, retainedSkills, skillsToLearn);
-        return this.userRepository.save(u);
+        User ru = this.userRepository.save(u);
+
+        List<Job> jobs = this.jobRepository.findAll();
+        List<Project> projects = this.projectRepository.findAll();
+        List<Internship> internships = this.internshipRepository.findAll();
+
+        if(jobs.size()!=0){
+            for (Job job : jobs) {
+                this.matchmakerService.setUpUserJobMatches(job, u);
+            }
+        }
+
+        if(projects.size()!=0){
+            for (Project project : projects) {
+                this.matchmakerService.setUpUserProjectMatches(project, u);
+            }
+        }
+
+        if(internships.size()!=0){
+            for(Internship internship : internships){
+                this.matchmakerService.setUpUserInternshipMatches(internship, u);
+            }
+        }
+
+        return ru;
     }
 
Index: src/main/java/it/finki/tinki/service/impl/MatchmakerServiceImpl.java
===================================================================
--- src/main/java/it/finki/tinki/service/impl/MatchmakerServiceImpl.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/service/impl/MatchmakerServiceImpl.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -11,5 +11,8 @@
 import it.finki.tinki.model.Users.User;
 import it.finki.tinki.model.enumerator.WorkType;
+import it.finki.tinki.repository.InternshipRepository;
+import it.finki.tinki.repository.JobRepository;
 import it.finki.tinki.repository.MatchRepository;
+import it.finki.tinki.repository.ProjectRepository;
 import it.finki.tinki.service.MatchmakerService;
 import org.springframework.stereotype.Service;
@@ -23,16 +26,27 @@
 
     MatchRepository matchRepository;
+    JobRepository jobRepository;
+    InternshipRepository internshipRepository;
+    ProjectRepository projectRepository;
 
-    public MatchmakerServiceImpl(MatchRepository matchRepository) {
+    public MatchmakerServiceImpl(MatchRepository matchRepository,
+                                 JobRepository jobRepository,
+                                 InternshipRepository internshipRepository,
+                                 ProjectRepository projectRepository) {
         this.matchRepository = matchRepository;
+        this.jobRepository = jobRepository;
+        this.internshipRepository = internshipRepository;
+        this.projectRepository = projectRepository;
     }
 
     @Override
     public List<Internship> getMatchingInternshipsForUser(User user) {
-        List<Match> matches = this.matchRepository.getAllByCombinedId_User_IdAndTypeOrderByCoefficientDesc(user.getId(), WorkType.INTERNSHIP);
+        List<Match> matches = this.matchRepository.getAllByEmbeddedMatchIdUserAndTypeOrderByCoefficientDesc(user.getId(), WorkType.INTERNSHIP);
+//        List<Match> matches = this.matchRepository.getAllByUserIdAndTypeOrderByCoefficientDesc(user.getId(), WorkType.INTERNSHIP);
 
         List<Internship> internships = new ArrayList<>();
         matches.forEach(match -> {
-            internships.add((Internship) match.getCombinedId().getWork());
+            internships.add((Internship) match.getEmbeddedMatchId().getWork());
+//            internships.add(this.internshipRepository.findById(match.getWorkId()).get());
         });
 
@@ -42,9 +56,11 @@
     @Override
     public List<Job> getMatchingJobsForUser(User user) {
-        List<Match> matches = this.matchRepository.getAllByCombinedId_User_IdAndTypeOrderByCoefficientDesc(user.getId(), WorkType.JOB);
+        List<Match> matches = this.matchRepository.getAllByEmbeddedMatchIdUserAndTypeOrderByCoefficientDesc(user.getId(), WorkType.INTERNSHIP);
+//        List<Match> matches = this.matchRepository.getAllByUserIdAndTypeOrderByCoefficientDesc(user.getId(), WorkType.JOB);
 
         List<Job> jobs = new ArrayList<>();
         matches.forEach(match -> {
-            jobs.add((Job) match.getCombinedId().getWork());
+            jobs.add((Job) match.getEmbeddedMatchId().getWork());
+//            jobs.add(this.jobRepository.findById(match.getWorkId()).get());
         });
 
@@ -54,9 +70,11 @@
     @Override
     public List<Project> getMatchingProjectsForUser(User user) {
-        List<Match> matches = this.matchRepository.getAllByCombinedId_User_IdAndTypeOrderByCoefficientDesc(user.getId(), WorkType.PROJECT);
+        List<Match> matches = this.matchRepository.getAllByEmbeddedMatchIdUserAndTypeOrderByCoefficientDesc(user.getId(), WorkType.INTERNSHIP);
+//        List<Match> matches = this.matchRepository.getAllByUserIdAndTypeOrderByCoefficientDesc(user.getId(), WorkType.PROJECT);
 
         List<Project> projects = new ArrayList<>();
         matches.forEach(match -> {
-            projects.add((Project) match.getCombinedId().getWork());
+            projects.add((Project) match.getEmbeddedMatchId().getWork());
+//            projects.add(this.projectRepository.findById(match.getWorkId()).get());
         });
 
@@ -72,6 +90,7 @@
 
         if(coef!=0){
-            EmbeddedMatchId matchId = new EmbeddedMatchId(job, user);
-            Match m = new Match(matchId, coef, WorkType.JOB);
+            EmbeddedMatchId embeddedMatchId = new EmbeddedMatchId(job, user);
+            Match m = new Match(embeddedMatchId, coef, WorkType.JOB);
+//            Match m = new Match(job.getId(), user.getId(), coef, WorkType.JOB);
             this.matchRepository.save(m);
         }
@@ -86,6 +105,7 @@
 
         if(coef!=0){
-            EmbeddedMatchId matchId = new EmbeddedMatchId(project, user);
-            Match m = new Match(matchId, coef, WorkType.PROJECT);
+            EmbeddedMatchId embeddedMatchId = new EmbeddedMatchId(project, user);
+            Match m = new Match(embeddedMatchId, coef, WorkType.PROJECT);
+//            Match m = new Match(project.getId(), user.getId(), coef, WorkType.JOB);
             this.matchRepository.save(m);
         }
@@ -100,6 +120,7 @@
 
         if(coef!=0){
-            EmbeddedMatchId matchId = new EmbeddedMatchId(internship, user);
-            Match m = new Match(matchId, coef, WorkType.INTERNSHIP);
+            EmbeddedMatchId embeddedMatchId = new EmbeddedMatchId(internship, user);
+            Match m = new Match(embeddedMatchId, coef, WorkType.PROJECT);
+//            Match m = new Match(internship.getId(), user.getId(), coef, WorkType.JOB);
             this.matchRepository.save(m);
         }
Index: src/main/java/it/finki/tinki/service/impl/SkillServiceImpl.java
===================================================================
--- src/main/java/it/finki/tinki/service/impl/SkillServiceImpl.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/service/impl/SkillServiceImpl.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -20,10 +20,10 @@
 
     @Override
-    public List<Skill> returnSkillsBasedOnId(List<Integer> skillIds) {
+    public List<Skill> returnSkillsBasedOnId(List<Long> skillIds) {
 
         List<Skill> list = new ArrayList<>();
 
         skillIds.forEach(skill -> {
-            this.skillRepository.findById(Long.valueOf(skill)).ifPresent(list::add);
+            this.skillRepository.findById(skill).ifPresent(list::add);
         });
 
Index: src/main/java/it/finki/tinki/service/impl/WorkServiceImpl.java
===================================================================
--- src/main/java/it/finki/tinki/service/impl/WorkServiceImpl.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/service/impl/WorkServiceImpl.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -77,5 +77,5 @@
 
     @Override
-    public Job insertJob(String title, String description, Long adccId, int salary, List<Integer> skillsRequired, AccountType type) {
+    public Job insertJob(String title, String description, Long adccId, int salary, List<Long> skillsRequired, AccountType type) {
         List<Skill> skills = this.skillService.returnSkillsBasedOnId(skillsRequired);
         Account account = this.accountService.findByIdAndType(adccId, type);
@@ -85,5 +85,5 @@
 
     @Override
-    public Internship insertInternship(String title, String description, Long adccId, int salary, List<Integer> skillsTrained, int openSpots, AccountType type) {
+    public Internship insertInternship(String title, String description, Long adccId, int salary, List<Long> skillsTrained, int openSpots, AccountType type) {
         List<Skill> skills = this.skillService.returnSkillsBasedOnId(skillsTrained);
         Account account = this.accountService.findByIdAndType(adccId, type);
@@ -93,5 +93,5 @@
 
     @Override
-    public Project insertProject(String title, String description, Long adccId, int salary, List<Integer> skillsRequired, Date validUntil, AccountType type) {
+    public Project insertProject(String title, String description, Long adccId, int salary, List<Long> skillsRequired, Date validUntil, AccountType type) {
         List<Skill> skills = this.skillService.returnSkillsBasedOnId(skillsRequired);
         Account account = this.accountService.findByIdAndType(adccId, type);
