On Mar 7, 11:40 pm, Marc Aymerich wrote:
> On Wed, Mar 7, 2012 at 9:13 PM, akaariai wrote:
> > I believe the reason is efficiency. If there were an on_delete
> > argument for GFKs every object deletion of any class would need to do
> > a query to check if
On Wed, Mar 7, 2012 at 9:13 PM, akaariai wrote:
> I believe the reason is efficiency. If there were an on_delete
> argument for GFKs every object deletion of any class would need to do
> a query to check if there happens to be any GFK related objects. In
> addition, Django
I believe the reason is efficiency. If there were an on_delete
argument for GFKs every object deletion of any class would need to do
a query to check if there happens to be any GFK related objects. In
addition, Django can't guarantee foreign key consistency. In case of
concurrent transactions it
The django docs says:
Unlike ForeignKey, GenericForeignKey does not accept an on_delete
argument to customize this behavior; if desired, you can avoid the
cascade-deletion simply by not using GenericRelation, and alternate
behavior can be provided via the pre_delete signal.
Does anyone knows why?
4 matches
Mail list logo