[Dbix-class] bug with find_or_new and update_or_insert, for
postgres DB
Jess Robinson
castaway at desert-island.me.uk
Tue Jan 8 17:06:16 GMT 2008
On Tue, 8 Jan 2008, Erik Colson wrote:
> Jess Robinson wrote:
>
>> There may be a DB where submitting NULL to a NOT NULL field which is
>> auto-inc does the required thing, but it's not sane, IMO.
>>
>> Most prefer either "don't supply it" or want "DEFAULT" instead which is
>> saner and iirc standard.
>>
>
> does this mean it is possible to do such a thing :
>
> $newrecord = $rs->new({id=>DEFAULT}) ;
No, that would be id => \'DEFAULT', otherwise it will think it's a string,
which it isnt.
> and then
>
> $newrecord->insert ;
>
> would autoincrement id if id is defined as a primary key autoincrement ?
>
Jess
More information about the DBIx-Class
mailing list