-
Grzegorz Szwarc authored
As a user, when a collection contains the following documents: [{ '_id: '1', name: 'foo' }, { _id: '2', name: 'bar' }] and there's a unique key constraint for the "name" property. I expect that, when trying to insert or upsert a document where the value of "name" is already being used by an existing document in the collection, the X Plugin will send back the same kind of error reporting the fact that the constraint was violated. However, currently, this is not the case, and the X Plugin is sending back a different error, which does not contain any kind of context for the case when an upsert actually translates to an insert and not an update. Not sure if this is the expected behavior or not but it looks like an inconsistency and the fact that the error does not tell the user what actually went wrong makes it even worse. RB: 23929 Reviewed-by:
Lukasz Kotula <lukasz.kotula@oracle.com>
Grzegorz Szwarc authoredAs a user, when a collection contains the following documents: [{ '_id: '1', name: 'foo' }, { _id: '2', name: 'bar' }] and there's a unique key constraint for the "name" property. I expect that, when trying to insert or upsert a document where the value of "name" is already being used by an existing document in the collection, the X Plugin will send back the same kind of error reporting the fact that the constraint was violated. However, currently, this is not the case, and the X Plugin is sending back a different error, which does not contain any kind of context for the case when an upsert actually translates to an insert and not an update. Not sure if this is the expected behavior or not but it looks like an inconsistency and the fact that the error does not tell the user what actually went wrong makes it even worse. RB: 23929 Reviewed-by:
Lukasz Kotula <lukasz.kotula@oracle.com>
Loading