-1

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

1 Answers1

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.