How do I send a POST request using Postman for a composite key? my composite key is:"favoritePK" which contains "id_ad" and "id_customer". i need your help
Asked
Active
Viewed 369 times
-1
-
Please add more details like code, an example etc. It is very difficult to help with this little info. – Derryl Thomas Mar 29 '21 at 13:44
1 Answers
0
I think there is no problem in your code. Your entity must contain both the fields id_ad, id_customer. Just send any request with both fields like:
{
id_ad: 1,
id_customer:2,
"name": "Someone Singh",
"bio": "Testing",
"dob": "1998-02-01"
}
And at the receiving end use @RequestBody with entity.

krishnkant jaiswal
- 535
- 3
- 9