Minor typo fix in schema manual
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Manual / SchemaIntro.pod
index 02ac2e6..c83e9da 100644 (file)
@@ -93,6 +93,10 @@ a second database you want to access:
 Note that L<DBIx::Class::Schema> does not cache connnections for you. If you
 use multiple connections, you need to do this manually.
 
+To execute some sql statements on every connect you can pass them to your schema after the connect:
+
+  $schema->storage->on_connect_do(\@on_connect_sql_statments);
+
 The simplest way to get a record is by primary key:
 
   my $schema = My::Schema->connect( ... );
@@ -102,7 +106,7 @@ This will run a C<SELECT> with C<albumid = 14> in the C<WHERE> clause,
 and return an instance of C<My::Schema::Album> that represents this
 row. Once you have that row, you can access and update columns:
 
-  $album->name('Physical Graffiti');
+  $album->title('Physical Graffiti');
   my $title = $album->title; # holds 'Physical Graffiti'
 
 If you prefer, you can use the C<set_column> and C<get_column>
@@ -189,7 +193,7 @@ rows:
 We also provide a handy shortcut for doing a C<LIKE> search:
 
   # Find albums whose artist starts with 'Jimi'
-  my $rs = MyApp::DB::Album->search_like({ artist => 'Jimi%' });
+  my $rs = $schema->resultset('Album')->search_like({ artist => 'Jimi%' });
 
 Or you can provide your own handmade C<WHERE> clause, like: