Insertion of NULL errors with SearchBuilder/Oracle

Addition: I don’t think there are many DBIx::SearchBuilder/Oracle users
out there as a simple Create call results in the following error:

[Sun Apr 13 17:41:10 2003] [crit]: RT::Handle=HASH(0xd4a67c) couldn’t
execute the query 'INSERT INTO Users (id, Comments, Password,
LastUpdatedBy, Created, id, RealName, Creator, Name, LastUpdated)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'ORA-00957: duplicate column name
(DBD ERROR: OCIStmtExecute)
make: *** [initialize-database] Error 255

this is because there is/was no duplicate checking within Insert().
I’ve got a whole swag of patches so I’ll send them all through soon. If
you look really carefully you’ll notice that the Comments field/column
is actually a CLOB type - and it inserts correctly :wink:

I’ve managed to correct with the following code change in

  • $sth = $self->SUPER::Insert( $table, ‘id’, $unique_id, @_);
  • my %attribs = @_;
  • $attribs{‘id’} = $unique_id;
  • delete $attribs{‘Id’};
  • $sth = $self->SUPER::Insert( $table, %attribs);

I’m now getting this far in the initialize-database procedure:

[Sun Apr 13 18:02:50 2003] [crit]: RT::Handle=HASH(0xd4a6e8) couldn’t
execute the query 'INSERT INTO GroupMembers (GroupId, MemberId, id)
VALUES (?, ?, ?)'ORA-01400: cannot insert NULL into
make: *** [initialize-database] Error 255

So I’m guessing that Oracle may be plagued with the same problem as Pg
was with the empty values not being added as ‘0’ and since the table
specification is stating NOT NULL I’m getting that error. Any hints on
this one?