mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #32442 -- Used converters on returning fields from INSERT statements.
This commit is contained in:
committed by
Mariusz Felisiak
parent
619f26d289
commit
d9de74141e
@@ -7,7 +7,7 @@ this behavior by explicitly adding ``primary_key=True`` to a field.
|
||||
|
||||
from django.db import models
|
||||
|
||||
from .fields import MyAutoField
|
||||
from .fields import MyAutoField, MyWrapperField
|
||||
|
||||
|
||||
class Employee(models.Model):
|
||||
@@ -31,8 +31,12 @@ class Business(models.Model):
|
||||
|
||||
|
||||
class Bar(models.Model):
|
||||
id = MyAutoField(primary_key=True, db_index=True)
|
||||
id = MyWrapperField(primary_key=True, db_index=True)
|
||||
|
||||
|
||||
class Foo(models.Model):
|
||||
bar = models.ForeignKey(Bar, models.CASCADE)
|
||||
|
||||
|
||||
class CustomAutoFieldModel(models.Model):
|
||||
id = MyAutoField(primary_key=True)
|
||||
|
||||
Reference in New Issue
Block a user