I want to delete specific record using Field Name

Table : Dummy Entity

* Field Id
* Field Name

```
public void deleteLocation(req, res){
String getLocationName = request.getParameter("locationName");
Location locationToDelete = new LocationImpl();
locationToDelete.setLocationName(getLocationName);
LocationLocalServiceUtil.deleteLocation(locationToDelete);
}

```

It's not showing me any error but the record doesn't get deleted. Please hep me out.