Help for this page

Select Code to Download


  1. or download this
        my $club = $c->model("DB::Clubs")
            ->create({ some_data => "asdfasdf",
                       venue => $id });
    
  2. or download this
        my $venue = $c->model("DB::Venue")->find($id);
        $venue->add_to_clubs({ some_club_data => "Without venue" });
    
  3. or download this
    # Inside MySchema::Result::Club.
    sub insert {
    ...
            unless $schema->resultset("Venue")->find($to_update{venue});
        $self->next::method(@_);
    }