Changes between Version 1 and Version 2 of Ticket #34293, comment 5


Ignore:
Timestamp:
Jan 25, 2023, 8:22:04 PM (2 years ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34293, comment 5

    v1 v2  
    3434> The order doesn't matter. It does not necessarily determine in which order the constraints are checked.
    3535
    36 which means that depending on the order in which PostgreSQL choose to check constraints the user could either get an `IntegrityError` or a `DataError` depending which attempting to insert data that violates one constraint and provides invalid data for the other.
     36which means that depending on the order in which PostgreSQL choose to check constraints the user could either get an `IntegrityError` or a `DataError` depending which attempting to insert data that violates one constraint and provides invalid data for the other. `Model.validate_constraints` chooses to validate all of them as it doesn't build on top of this ordering assumption.
     37
     38To me this is a case of ''wontfix'' to avoid having users continue to build flawed assumptions about the order of definitions of their `Meta.constraints` entries.
Back to Top