Re: Re: Code generator

[prev] [thread] [next] [Date index for 2005/07/25]

From: Tony Bowden
Subject: Re: Re: Code generator
Date: 22:03 on 25 Jul 2005
> > I really just want to know if the old way of using has_many
> > __PACKAGE__->has_many(accessor_name,remote_package_name =>
> > 'remote_package_PK');] will stay supported. Maybe I'm not at the right place
> > to get the answer.
> Lots of people use this format and i've never heard Tony mentioning taking it
> out but i havent followed this thread yet. .  If he ever does hovever know that
> he believes in a long deprecation cycle (of 2 or more years as far as i can
> tell) so you will be safe using it for a long time.  

There are no plans to take it out any time soon.

It is possible that the final option will become a hash of options, to
enable better control, but 

a) there will be a check to say "if there's only one argument here, and
it's not a reference, then it's the old style"

and

b) Even if it does break, you can easily work around it. Because
Relationships are neatly Pluggable, all you need to do is copy
Class::DBI::Relationship::HasMany to Class::DBI::Relationship::OldHasMany,
and make sure that your base class contains

	__PACKAGE__->add_relationship_type(
		has_many   => "Class::DBI::Relationship::OldHasMany"
	);

Any significant change to has_many would probably involve doing something
like that internally anyway.


Tony

Code generator
justine.brassard 14:03 on 22 Jul 2005

Re: Code generator
Sebastian Riedel 17:12 on 22 Jul 2005

Re: Re: Code generator
justine.brassard 19:18 on 25 Jul 2005

Re: Re: Code generator
Peter Speltz 21:58 on 25 Jul 2005

Re: Re: Code generator
Tony Bowden 22:03 on 25 Jul 2005

Generated at 16:36 on 28 Jul 2005 by mariachi v0.52