[odb-users] odb (2.3.0) with MySQL sql-mode NO_AUTO_VALUE_ON_ZERO

Пустовалов Дмитрий pustovalovdmit at gmail.com
Thu Mar 23 11:05:11 EDT 2017


Thx, Boris. This approach works.

ср, 22 мар. 2017 г. в 19:58, Boris Kolpackov <boris at codesynthesis.com>:

> Hi,
>
> Пустовалов Дмитрий <pustovalovdmit at gmail.com> writes:
>
> > I use MySQl with enabled sql-mode NO_AUTO_VALUE_ON_ZERO, which means that
> > it's not possible to use 0 in INSERT statements for PK column to indicate
> > MySQL that it should automatically assign value for PK.
> >
> > Is there some way to force odb compliter to generate proper SQL-code
> > because I don't want to disable NO_AUTO_VALUE_ON_ZERO?
>
> Not at the moment. But we had a similar issue with SQLite which was
> addressed by allowing NULL values for auto ids. Here is the commit:
>
>
> http://scm.codesynthesis.com/?p=odb/odb.git;a=commit;h=4fd2c107242fe9f8e6ba7ded2a789f4de2ccd040
>
> Perhaps we could do the same for MySQL?
>
> Boris
>


More information about the odb-users mailing list