This looks more like an application error than a NotORM error. Aren't
you expecting auto_increment on some column where it actually isn't
defined? Or aren't you setting such column to some value manually?
Jakub
On 11/16/2014 12:50 AM, Ondřej Šatera wrote:
> Hi, I have a problem with NotORM since I've started
> using NotORM_Cache_Database. I'm receiving exceptions with this content:
> |
>
> PHP Fatalerror:Uncaughtexception PDOExceptionwithmessage
> 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
> 'stages;act' for key
> 'PRIMARY''in/***/NotORM/Result.php:448@
http://www.wulflund.com/en/search/list/?vp-page=1
> <
http://www.wulflund.com/en/search/list/?vp-page=1>
>
> |
> |
>
> PHP Fatalerror:Uncaughtexception PDOExceptionwithmessage
> 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
> 'store_goods;goods_id,size_value_id,store_id' for key
> 'PRIMARY''in/***/NotORM/Result.php:448@
http://www.wulflund.com/fr/order/confirm/?do=confirmForm-submit
> <
http://www.wulflund.com/fr/order/confirm/?do=confirmForm-submit>
>
> |
> The weird thing is that only some users receive this error. I cannot
> easily replicate it. My theory is that it is somehow bound to user's
> session.
>
> My initialization of NotORM looks like this:
> |
> $connection = new PDO ( "mysql:dbname=***; host=*** );
> $connection->exec('SET CHARACTER SET utf8');
> $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
> $connection->errorInfo();
>
> $notORMCache = new NotORM_Cache_Database($connection);
>
> $notORM = new NotORM (
> $connection,
> new NotORM_Structure_Discovery($connection, $notORMCache),
> $notORMCache
> );
> |
>
> The project is using Nette in version 2.0 and the servers runs on PHP 5.3.
>
> --
> You received this message because you are subscribed to the Google
> Groups "NotORM" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
notorm+un...@googlegroups.com
> <mailto:
notorm+un...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.