mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	Fixed #24997 -- Enabled bulk_create() on proxy models
This commit is contained in:
		
				
					committed by
					
						 Tim Graham
						Tim Graham
					
				
			
			
				
	
			
			
			
						parent
						
							fedef7b2c6
						
					
				
				
					commit
					9a5cfa05a0
				
			| @@ -1768,6 +1768,10 @@ This has a number of caveats though: | ||||
|   does not retrieve and set the primary key attribute, as ``save()`` does. | ||||
| * It does not work with many-to-many relationships. | ||||
|  | ||||
| .. versionchanged:: 1.9 | ||||
|  | ||||
|     Support for using ``bulk_create()`` with proxy models was added. | ||||
|  | ||||
| The ``batch_size`` parameter controls how many objects are created in single | ||||
| query. The default is to create all objects in one batch, except for SQLite | ||||
| where the default is such that at most 999 variables per query are used. | ||||
|   | ||||
| @@ -365,6 +365,9 @@ Management Commands | ||||
| Models | ||||
| ^^^^^^ | ||||
|  | ||||
| * :meth:`QuerySet.bulk_create() <django.db.models.query.QuerySet.bulk_create>` | ||||
|   now works on proxy models. | ||||
|  | ||||
| * Database configuration gained a :setting:`TIME_ZONE <DATABASE-TIME_ZONE>` | ||||
|   option for interacting with databases that store datetimes in local time and | ||||
|   don't support time zones when :setting:`USE_TZ` is ``True``. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user