We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UPDATE project SET projectFlag='0',userId=#{userId} WHERE projectCode=#{projectCode}
일때 , update하고 싶은 값만 변경 할수 있는데요
public void delete(int projectCode) { Project project = projectRepository.findOne(projectCode); project.setProjectFlag("0"); project.getUser().setUserId("gcssystem"); projectRepository.save(project); }
find를 통해서 project객체를 받은 다음에 , 거기서 update하고 싶은 값을 변경해서 save 하는 방법을 사용해야 하는것 인가요?
The text was updated successfully, but these errors were encountered:
이미 한 번 findOne으로 가져온 객체에는 set만 하면 되고, 맨 마지막의 save를 따로 안 해주셔도 될 겁니다. 꼭 테스트 해보시고 확실히 확인해보세요.
Sorry, something went wrong.
No branches or pull requests
SQL문
일때 , update하고 싶은 값만 변경 할수 있는데요
JPA
find를 통해서 project객체를 받은 다음에 , 거기서 update하고 싶은 값을 변경해서 save 하는 방법을 사용해야 하는것 인가요?
2번의 과정을 거져야 하는 것인가요? 위의 방법 말고 다른 방법도 있나요?
The text was updated successfully, but these errors were encountered: