Closed nypgand1 closed 8 years ago
@nicolaiarocci Hi, any suggestions on this issue?
I think we can also just catch the DB constraint failure and for free we will get better performance. So far Eve-SQLAlchemy just generate suspicious 500 err.
@nypgand1 The issue is marked as closed. Did it solve your problem ? I'm using Eve-SQLAlchemy 0.4.1, and still seeing this issue (i.e. unique constrain checked on single column rather than on a composite key)
@nicolaiarocci help ?
@mandarvaze Sorry. I'm not quite sure whether it is solved or not, because I don't use it now.
Hi guys, I don't work on the sql-alchemy extension and don't use it in production so I'm afraid I can offer no help here.
PS in Eve, unique
rule is a feature of the Mongo validator.
Workaround: You can basically just remove the unique constraint. Eve will not check and if you actually enter something into the db that violates your constraint you will get an IntegrityError
Could we please reopen this issue? It still exists and this is the place with the most information about it. The mentioned fix seems to have references the wrong issue.
In the docs of SQLAlchemy, it says:
But in eve-sqlalchemy and cerberus, we validate the
unique
constraint in the scope of single column.Any suggestions on this issue?