How to update an object with another object value in JPQL using Spring JPA
Clash Royale CLAN TAG #URR8PPP How to update an object with another object value in JPQL using Spring JPA I'm facing a problem in JPQL. I have two entities like below class Employee{ private Long id; private String name; private Department department; public void setId(Long id){ this.id = id; } public void setName(String name){ this.name = name; } public void setDepartment(Department department){ this.department = department } public Long getId(){ return this.id; } public String getName(){ return this.name; } public Department getDepartment(){ return this.department; } } and... class Department{ private Long id; private String name; public void setId(Long id){ this.id = id; } public void setName(String name){ this.name = name; } public Long getId(){ return id; } public String getName(){ return name; } } Now i need to update an Employee 's department. I have tried the query below. Employee ...