jdaugherty commented on issue #14503:
URL: https://github.com/apache/grails-core/issues/14503#issuecomment-4375499276

   There's 2 options here: 
   
   Option 1 - match the sql standard
   (url=X, method=POST)  → validated, saved ✓                                   
                                                                                
                                                    
   (url=X, method=null)  → validation skipped, saved ✓                          
                                                                                
                                                    
   (url=X, method=null)  → validation skipped, saved ✓  ← duplicates allowed    
                                                                                
                                                    
   The DB unique index (in PostgreSQL/MySQL) also won't catch those duplicates, 
since both treat NULLs as distinct.   
   
   Option 2 - null check 
   (url=X, method=POST)  → saved ✓
   (url=X, method=null)  → no match, saved ✓                                    
                                                                                
                                                    
   (url=X, method=null)  → finds first null row, validation error ✗     
   
   Option #2 doesn't function like the sql standard, but option 1 does.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to