I am new to DBIx::Class require help understanding a few basic issues. I
have defined an  App::Schema::Result::A class where the corresponding table,
primary keys and columns are described in the usual way.

I want to add custom methods to the class as a whole so I defined a
ResultSet class: App::Schema::ResultSet::A so that both ResultSet/A and
Result/A are under the Schema folder. However I recently came across this
Tutorial<http://search.cpan.org/%7Ejrobinson/DBIx-Class-Tutorial-0.0001/lib/DBIx/Class/Tutorial/Part3.pod#Adding_ResultSet_methods>that
advises:

 ## Set the new resultset class, in Breadcrumbs::Schema::Path:
>   __PACKAGE__->resultset_class('Breadcrumbs::ResultSet::Path');
>
>
> Make sure you don't create the new ResultSet class in the
> namespace/directory underneath the existing Schema. This will cause
> "load_classes" in DBIx::Class::Schema to attempt to load it as if it were a
> Result class. The result will not be good.
>

 I had followed neither of the two recommendations - I did  not call
result_class on my subclass and added the new subclass directly undeneath
the Schema namespace. Yet everything magically seems to work!  Am I doing
something wrong that will blow up on me later?

Thank you for your attention
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to