#24012: models.UUIDfield fails on Oracle backend
-------------------------------------+-------------------------------------
Reporter: JorisBenschop | Owner: nobody
Type: Uncategorized | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle, | Triage Stage: Accepted
models.UUIDfield,1.8-alpha |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by mjtamlyn):
* keywords: oracle, models.UUIDfield => oracle, models.UUIDfield,1.8-alpha
* stage: Unreviewed => Accepted
Comment:
Given that oracle has a uuid generation function, and it seems possibly an
accepted way of storing that (in a `RAW(16)`) it would be nice to store it
in a binary field on Oracle.
This is somewhere between the situation for SQLite/Mysql (no good binary
field or uuid support) and the situation for PostgreSQL (complete uuid
support in the database driver), so may well need a new database feature.
If this change is to be implemented, it must be done before Django 1.8 as
once we have existing fields out there we cannot change the field type.
Unfortunately I do not have an Oracle test environment and have little
impetus to work on this.
That said, I expect a full fix to look something like:
- Change the database type for Oracle (backends/oracle/creation.py)
- Change the converter function above
- Add a new database feature (has_binary_uuid)
- Check that feature in UUIDField.get_db_prep_value to convert the lookup
value into bytes instead of a hex string
You should make sure all the tests in `tests.model_fields.test_uuid` pass.
--
Ticket URL: <https://code.djangoproject.com/ticket/24012#comment:11>
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/071.b42b55121e31a710f8673ad9ba2c2d11%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.