deleted entity passed to persist:

Devan Goodwin dgoodwin at rm-rf.ca
Tue Mar 23 11:55:47 UTC 2010


Looks like it's loading all the consumer's entitlements just to delete
one. Still not great but better than all consumers at least.

On Tue, Mar 23, 2010 at 12:50 AM, Jesus M. Rodriguez <jmrodri at gmail.com> wrote:
> On Mon, Mar 22, 2010 at 8:17 PM, Adam Young <ayoung at 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
> _______________________________________________
> candlepin mailing list
> candlepin at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/candlepin
>



-- 
Devan Goodwin <dgoodwin at rm-rf.ca>
http://rm-rf.ca



More information about the candlepin mailing list