I'm not sure my syntax is correct.
My controller
@RequestMapping(value = "/bakedGoods/{id}", method = RequestMethod.DELETE, produces = "application/json")
public @ResponseBody ResponseEntity<Object> deleteABakedGood(@PathVariable long id){
bakedGoodsService.deleteABakedGoodInDB(id);
My Service
public void deleteABakedGoodInDB(long id) {
bakedGoodsDAO.deletBakedGood(id);
My DAO
@Transactional
public void deletBakedGood(long id) {
em.remove(id);
em.flush();
It says the long id isn't defined but the it is defined in the entity as id.