[Dbix-class] $rs->create() with no column values bombs on Oracle

Peter Rabbitson rabbit+dbic at rabbit.us
Thu Sep 11 17:58:25 GMT 2014


On 09/11/2014 05:48 PM, Lasse Makholm wrote:
> Hi,
>
> We're porting a DBIx::Class application from MySQL to Oracle, containing
> some insert statements with no column specifications by way of
> $rs->create({}). This doesn't seem to work on Oracle.
>
> DBIx::Class::SQLMaker generates "INSERT INTO table DEFAULT VALUES
> RETURNING id INTO ?" which, as far as I can figure is not valid syntax
> on Oracle. Neither the is the other common variant for such statements;
> "INSERT INTO table () VALUES ()".

This is clearly a bug that we've never tested for previously. Can you 
please confirm that the following works on your Oracle RDBMS (yes, the 
first ()pair is gone):

INSERT INTO $tablename VALUES(DEFAULT);




More information about the DBIx-Class mailing list