[Dbix-class] find_or_create problem with Pg: proposed patch
Alex Povolotsky
tarkhil at over.ru
Thu Apr 3 20:20:57 BST 2008
Jess Robinson wrote:
>
>
> On Thu, 3 Apr 2008, Alex Povolotsky wrote:
>
>> Hello!
>>
>> Attempt to insert into postgres table with undef's for columns with
>> default values yields an error. It is especially bad with
>> find_or_create sub.
>
> Are those columns also nullable, or not? If they're not, inserting
> null/undef doesn't make sense.. In DBIx::Class or plain SQL. the
> solution is generally to insert \'DEFAULT' ..
They are not nullable. The problem manifested itself in primary keys. If
you can do better, do it.
Alex.
More information about the DBIx-Class
mailing list