a column accessor). For C<multi> accessors, an add_to_* method is also
created, which calls C<create_related> for the relationship.
-=item is_foreign_rel
+=item relationship_target_owns_me
This is automatically set for all of the relationship helper methods. This is
basically a flag that allows us to correctly introspect true foreign keys;
my ($class, $rel, $f_class, $cond, $attrs) = @_;
# assume a foreign key contraint unless defined otherwise
- $attrs->{is_foreign_key_constraint} = 1
- if not $attrs->{is_foreign_key_constraint};
+ $attrs->{relationship_target_owns_me} = 1
+ if not $attrs->{relationship_target_owns_me};
$attrs->{is_foreign_rel} = 1
if not exists $attrs->{is_foreign_rel};
my $default_cascade = ref $cond eq 'CODE' ? 0 : 1;
- $attrs->{is_foreign_rel} = 0
- if not $attrs->{is_foreign_rel};
+ $attrs->{relationship_target_owns_me} = 0
+ if not $attrs->{relationship_target_owns_me};
$class->add_relationship($rel, $f_class, $cond, {
accessor => 'multi',
my $default_cascade = ref $cond eq 'CODE' ? 0 : 1;
- $attrs->{is_foreign_rel} = 0
- if not $attrs->{is_foreign_rel};
+ $attrs->{relationship_target_owns_me} = 0
+ if not $attrs->{relationship_target_owns_me};
$class->add_relationship($rel, $f_class,
$cond,