8 my $schema = DBICTest->init_schema();
12 my $bookmark = $schema->resultset("Bookmark")->find(1);
13 my $link = $bookmark->link;
14 my $link_id = $link->id;
16 my $new_link = $schema->resultset("Link")->new({
18 url => "http://monstersarereal.com",
19 title => "monstersarereal.com"
22 # Changing a relationship by id rather than by object would cause
23 # old related_resultsets to be used.
24 $bookmark->link($new_link->id);
25 is $bookmark->link->id, $new_link->id;
28 is $bookmark->link->id, $new_link->id;