posted 2 years ago
I have two entities, Vehicle and Owner. The Vehicle has a foreign key that references the owner of that vehicle, and whenever I try to post a foreign key to reference the owner_id for the vehicle, it gives me an error.
{
"timestamp": "2020-11-22T23:48:27.344+00:00",
"status": 400,
"error": "Bad Request",
"message": "",
"path": "/addVehicle"
}
It lets me add a vehicle, but only when the owner ID is null. When I go directlly to the MySQL query on phpMyAdmin and type it in by inserting into the table using the SQL syntax, it works fine.