Ensure that using Constraints requires to be inside a transaction