require DBIx::Class;
use namespace::clean;
-our $VERSION = '0.07001';
+our $VERSION = '0.08000';
__PACKAGE__->mk_group_ro_accessors('simple', qw/
schema
The option also takes a hashref:
- naming => { relationships => 'v7', monikers => 'v7' }
+ naming => { relationships => 'v8', monikers => 'v8' }
The keys are:
If you don't have any CamelCase table or column names, you can upgrade without
breaking any of your code.
+=item v8
+
+This mode tries harder to not have collisions between column accessors and
+belongs_to relationship accessors.
+
=back
Dynamic schemas will always default to the 0.04XXX relationship names and won't
__PACKAGE__->naming('current');
-Or if you prefer to use 0.07XXX features but insure that nothing breaks in the
+Or if you prefer to use 0.08XXX features but insure that nothing breaks in the
next major version upgrade:
- __PACKAGE__->naming('v7');
+ __PACKAGE__->naming('v8');
=head2 generate_pod
=cut
-my $CURRENT_V = 'v7';
+my $CURRENT_V = 'v8';
my @CLASS_ARGS = qw(
schema_base_class result_base_class additional_base_classes
$self->relationship_attrs,
);
}
+ elsif ($self->naming->{relationships} eq 'v6') {
+ require DBIx::Class::Schema::Loader::RelBuilder::Compat::v0_07;
+ return $self->{relbuilder} ||= DBIx::Class::Schema::Loader::RelBuilder::Compat::v0_07->new (
+ $self->schema,
+ $self->inflect_plural,
+ $self->inflect_singular,
+ $self->relationship_attrs,
+ );
+ }
return $self->{relbuilder} ||= DBIx::Class::Schema::Loader::RelBuilder->new (
$self->schema,