I am trying to create a web service using Jersey and connect to the database using Hibernate.
Due to security reasons, I don't want to pass the primary key value from the server to the client or the opposite direction. In that case, how can I update a record? From examples I've seen you should call session.load(key)
and change the returned object, but like I said, I won't be having the key value.
You may not pass a primary key to update a record but it implies two things :
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.