Re: Prefetch object with to_attr set to the same name as the field triggers rows deletions

2015-11-05 Thread Michele Ciccozzi
Hello Simon, I'm going to paste a trimmed-down version of the involved classes: class CeleryTask(models.Model): celery_task_id = models.CharField(max_length=50, primary_key=True) task_type = models.ForeignKey(ContentType) task_id = models.PositiveIntegerField() task = GenericForei

Re: Prefetch object with to_attr set to the same name as the field triggers rows deletions

2015-11-06 Thread Michele Ciccozzi
Thank you very much, Simon, for the detailed answer. Now I'm digging through Django code, pull requests, and tickets, and it's all very interesting. Thank you also for the reminder of incoming deprecations: we'll definitely be on the lookout for that! All the best, Michele On Fri, Nov 6, 2015 at

Re: Prefetch object with to_attr set to the same name as the field triggers rows deletions

2015-11-09 Thread Michele Ciccozzi
Hello Simon, Thank you very much for this very interesting follow-up: it's like everyday there's a new reason to keep digging in the source code! I'll see you there ;) All the best, Michele On Sat, Nov 7, 2015 at 11:35 AM, Simon Charette wrote: > Hi Michele, > > I don't if someone beat you to