ZF2-384: Error-inducing insert call from AbstractTableGateway does not fail with an exception
Description
Steps: zf2 beta4 Create a database which could not accept a particular insert (a column with NOT NULL) Attempt to insert (and specify no value for the above column)
Expected: Fail with exception that contains the db's error message (column cannot be null, etc)
Actual: Fails silently
I worked around this by actually retrieving the resource object (PDO) from the connection,driver,adapter ... and then checked errorInfo manually.
Comments
Posted by Ralph Schindler (ralph) on 2012-07-02T14:32:09.000+0000
What database is this? And, is PDO not throwing an exception?
Posted by Yonni Mendes (yonman) on 2012-07-02T14:38:36.000+0000
Sqlite, I admit I haven't investigated it further than just checking the errorInfo array of information in PDO itself. The exception part is a bit of mental gymnastics on my part - it's what I'd expect that will happen should a query fail.
Posted by Ralph Schindler (ralph) on 2012-08-14T15:31:28.000+0000
I've tried to reproduce this in sqlite and mysql (with STRICT_TRANS_TABLES), I get exceptions.
If it's still an issue, let's reopen with some code samples.