GNU.WIKI: The GNU/Linux Knowledge Base

  [HOME] [PHP Manual] [HowTo] [ABS] [MAN1] [MAN2] [MAN3] [MAN4] [MAN5] [MAN6] [MAN7] [MAN8] [MAN9]

  [0-9] [Aa] [Bb] [Cc] [Dd] [Ee] [Ff] [Gg] [Hh] [Ii] [Jj] [Kk] [Ll] [Mm] [Nn] [Oo] [Pp] [Qq] [Rr] [Ss] [Tt] [Uu] [Vv] [Ww] [Xx] [Yy] [Zz]


NAME

       DBIx::Class::Helper::Row::RelationshipDWIM - Type less for your
       relationships!

SYNOPSIS

       Base clase:

        package MyApp::Schema::Result;

        use parent 'DBIx::Class::Core';

        __PACKAGE__->load_components('Helper::Row::RelationshipDWIM');

        sub default_result_namespace { 'MyApp::Schema::Result' }

        1;

       Result class:

        package MyApp::Schema::Result::Foo;

        use parent 'MyApp::Schema::Result';

        # Define various class bits here

        # succint relationship definition yeah!

        __PACKAGE__->has_many(friends => '::Person', 'foo_id');

        # or with DBIx::Class::Candy:
        has_many friends => '::Person', 'foo_id';

        1;

DESCRIPTION

       This module prepends your "default_result_namespace" to related objects
       if they begin with "::".  Simple but handy.

AUTHOR

       Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>

COPYRIGHT AND LICENSE

       This software is copyright (c) 2014 by Arthur Axel "fREW" Schmidt.

       This is free software; you can redistribute it and/or modify it under
       the same terms as the Perl 5 programming language system itself.

perl v5.18.2                   DBIx::Class::Helper::Row::RelationshipDWIM(3pm)



  All copyrights belong to their respective owners. Other content (c) 2014-2018, GNU.WIKI. Please report site errors to webmaster@gnu.wiki.
Page load time: 0.174 seconds. Last modified: November 04 2018 12:49:43.