mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Refs #32143 -- Adjusted a comment about subquery usage in Query.split_exclude().
This commit is contained in:
		
				
					committed by
					
						 Mariusz Felisiak
						Mariusz Felisiak
					
				
			
			
				
	
			
			
			
						parent
						
							0cfcab4eec
						
					
				
				
					commit
					cfc9c94d97
				
			| @@ -2035,11 +2035,10 @@ class Query(BaseExpression): | ||||
|             ) | ||||
|             condition.add(or_null_condition, OR) | ||||
|             # Note that the end result will be: | ||||
|             # (outercol NOT IN innerq AND outercol IS NOT NULL) OR outercol IS NULL. | ||||
|             # This might look crazy but due to how IN works, this seems to be | ||||
|             # correct. If the IS NOT NULL check is removed then outercol NOT | ||||
|             # IN will return UNKNOWN. If the IS NULL check is removed, then if | ||||
|             # outercol IS NULL we will not match the row. | ||||
|             #   NOT EXISTS (inner_q) OR outercol IS NULL | ||||
|             # this might look crazy but due to how NULL works, this seems to be | ||||
|             # correct. If the IS NULL check is removed, then if outercol | ||||
|             # IS NULL we will not match the row. | ||||
|         return condition, needed_inner | ||||
|  | ||||
|     def set_empty(self): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user