#12402: Deferring geometry field causes invalid results or crash -------------------+-------------------------------------------------------- Reporter: jtiai | Owner: nobody Status: new | Milestone: Component: GIS | Version: SVN Keywords: orm | Stage: Unreviewed Has_patch: 0 | -------------------+-------------------------------------------------------- If geometry field is not last and .defer('geom') is used results are populated incorrectly.
It seems that geometry field is always counted in fields in even it is marked as deferred. {{{ class MyModel(models.Model): geom = models.PointField() num = models.IntegerField() objects = models.GeoManager() >>> MyModel(geom=Geometry('POINT(10 10)'),num=1).save() >>> my_objs = MyModel.objects.defer('geom').all() >>> print my_objs >>> [] }}} -- Ticket URL: <http://code.djangoproject.com/ticket/12402> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.