fix: generate sql incorrect when use soft_delete and only one OR
This commit is contained in:
		
							parent
							
								
									d69be45dd2
								
							
						
					
					
						commit
						8846f34747
					
				@ -94,8 +94,12 @@ func And(exprs ...Expression) Expression {
 | 
			
		||||
		return nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if _, ok := exprs[0].(OrConditions); !ok && len(exprs) == 1 {
 | 
			
		||||
		return exprs[0]
 | 
			
		||||
	if len(exprs) == 1 {
 | 
			
		||||
 | 
			
		||||
		if _, ok := exprs[0].(OrConditions); !ok {
 | 
			
		||||
			return exprs[0]
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return AndConditions{Exprs: exprs}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user