kaare: Kaare Rasmussen
kd: Kieren Diment <diment@gmail.com>
konobi: Scott McWhirter <konobi@cpan.org>
+Lasse Makholm <lasse@unity3d.com>
lejeunerenard: Sean Zellmer <sean@lejeunerenard.com>
littlesavage: Alexey Illarionov <littlesavage@orionet.ru>
lukes: Luke Saunders <luke.saunders@gmail.com>
Revision history for DBIx::Class
* Fixes
+ - Fix $rs->create() with no values on Oracle
- Silence with_deferred_fk_checks() warning on PostgreSQL 9.4
* Misc
$self->next::method($schema, $type, $version, $dir, $sqltargs, @rest);
}
+sub insert {
+ my ($self, $source, $to_insert) = @_;
+
+ # Oracle does not understand INSERT INTO ... DEFAULT VALUES syntax
+ # Furthermore it does not have any way to insert without specifying any columns
+ # We can't fix this in SQLMaker::Oracle because it doesn't know which column to add to the statement
+ unless (%$to_insert)
+ {
+ my ($col) = $source->columns;
+ $to_insert = { $col => \'DEFAULT' };
+ }
+
+ return $self->next::method($source, $to_insert);
+}
+
sub _dbh_last_insert_id {
my ($self, $dbh, $source, @columns) = @_;
my @ids = ();
{
my $new_artist = $schema->resultset('Artist')->new({});
isa_ok( $new_artist, 'DBIx::Class::Row', '$rs->new gives a row object' );
+ lives_ok { $new_artist->insert() } 'inserting without specifying any columns works';
+ $new_artist->discard_changes;
+ $new_artist->delete;
}
# make sure we got rid of the compat shims
like ($seq, qr/\.${q}artist_pk_seq${q}$/, 'Correct PK sequence selected for sqlt-like trigger');
}
+ lives_ok {
+ $new = $schema->resultset('Artist')->create({});
+ $new->discard_changes;
+ ok $new->artistid, 'Created row has id'
+ } 'Create with empty hashref works';
+
+
# test LIMIT support
for (1..6) {
$schema->resultset('Artist')->create({ name => 'Artist ' . $_ });