(Not sure what the issue is, could be
Java related or flow design.
the title may be misleading (99% ?), but for the background, I put below 5 points. 1M Thanks.)
1. Simple Object Model: ProspectCustomer extends Customer
2. I use Restful GET to find the prospect customer. I got the returned prospect customer in the form of JSON.
3. I use Restful PUT to update the prospect customer. [In the backend, JPA used merge operation.]
4. For debugging, If I changed Customer to ProspectCustomer in Rest code as below, then it's OK for JPA code.
5. Now, if I want to keep Customer parameter (not ProspectCustomer) in my Rest code, then what need to be done in terms of correction?
===============================================================================