[Dbix-class] postgresql and serial primary key
Peter Rabbitson
rabbit+dbic at rabbit.us
Mon Feb 2 19:34:16 GMT 2015
On 02/02/2015 08:32 PM, Maddy, Noel wrote:
> Luca,
>
> IIRC, if you pass any value (even NULL) for the pk column, then it bypasses the sequence.
Very well spotted, I didn't realize outright this is what was going on.
Luca - this is exactly the issue, it is valid (sometimes) to insert
NULLs into stuff marked as PK, so DBIC does allow it. I might consider a
warning in the future, but it won't ever become illegal.
More information about the DBIx-Class
mailing list