mirror of
https://github.com/django/django.git
synced 2025-11-22 20:16:24 +00:00
Fixed #36260 -- Made bulk_create() work with DB-generated primary keys.
Co-authored-by: Simon Charette <charette.s@gmail.com>
This commit is contained in:
parent
c75fbe8430
commit
77b4ecbd53
4 changed files with 21 additions and 6 deletions
|
|
@ -147,3 +147,7 @@ class RelatedModel(models.Model):
|
|||
class DbDefaultModel(models.Model):
|
||||
name = models.CharField(max_length=10)
|
||||
created_at = models.DateTimeField(db_default=Now())
|
||||
|
||||
|
||||
class DbDefaultPrimaryKey(models.Model):
|
||||
id = models.DateTimeField(primary_key=True, db_default=Now())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue