#24343: UUID foreign key accessor returns inconsistent type
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: Bug | Status: new
Component: Database | Version: 1.8alpha1
layer (models, ORM) |
Severity: Release | Keywords:
blocker |
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Current test failure on Oracle (and it's an issue on other backends but
tests are skipped on other backends besides Oracle and PostgreSQL due to
`@skipUnlessDBFeature("can_defer_constraint_checks")`:
{{{
Traceback (most recent call last):
File "/mnt/jenkinsdata/workspace/django-
oracle/database/oracle11/python/python2.7/django/utils/functional.py",
line 15, in _curried
return _curried_func(*(args + moreargs), **dict(kwargs, **morekwargs))
File "/mnt/jenkinsdata/workspace/django-
oracle/database/oracle11/python/python2.7/tests/serializers_regress/tests.py",
line 479, in serializerTest
func[1](self, pk, klass, datum)
File "/mnt/jenkinsdata/workspace/django-
oracle/database/oracle11/python/python2.7/tests/serializers_regress/tests.py",
line 154, in fk_compare
testcase.assertEqual(data, instance.data_id)
AssertionError: UUID('3f57e641-c3c7-4990-be67-f3207e4f5bd2') !=
u'3f57e641c3c74990be67f3207e4f5bd2'
}}}
Give this model:
{{{
class FKToUUID(models.Model):
data = models.ForeignKey(UUIDData)
}}}
`obj.data_id` returns a string on all backends except PostgreSQL which
returns a UUID. Might be related to the `has_native_uuid_field` database
features flag.
--
Ticket URL: <https://code.djangoproject.com/ticket/24343>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.9c6ba1de2824b67e008ed69774597062%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.