On Mon, Mar 22, 2010 at 8:17 PM, Adam Young ayoung@redhat.com wrote:
If you see the above error, it seems to mean that a delete is violating a constraint.
I got this exception with the following code:
@DELETE @Path("/{dbid}") public void unbind(@PathParam("dbid") Long dbid) {
Entitlement toDelete = entitlementCurator.find(dbid); if (toDelete != null) { //toDelete.getConsumer().getEntitlements().remove(toDelete); entitlementCurator.delete(toDelete); return; } throw new NotFoundException( "Entitlement with ID '" + dbid + "' could not be found"); }
To get rid of the error, uncomment out the line //toDelete...
But won't that load ALL of the consumers entitlements just to delete it?
Sincerely, jesus