Hi expert,
I am running into another problem.
Guess my
Java fundamental is really bad such that I don't know how to handle this case.
Basically, I have a Post endpoint where the @RequestBody is Order order
Now, this Order will have contains a petid
So, I have a constructor as follows:
My apologies I coulnt't get the image out cos the photo is real bad.
When I
test out using postman, it will give me :
"quantity" : null // I didn't ask for this so why it will appear ? but quanity is part of the fields in Order class.
"ordertimestamp : "2020-11-17T11:13343"
"status" : "approved"
"complete": false
"id" : null // ? why it will appear null ?
This is what I entered into the body of Postman:
{
"id" : 11,
"petid: 3,
"orderTimestamp" :"2020-11-17T11:13343"
"status" : approved",
"complete": false,
"id" : 2
}
My question is how do i get the petid to show up in postman and why would id - which is order id will appear null ?
[/code]
Any tips, hints are greatly appreciated.