Data::Morph::Backend::DBIC - Provides a Data::Morph backend for DBIx::Class
Data::Morph::Backend::DBIC implements a Data::Morph backend that talks to a database via DBIx::Class. New instances or rows are created from the passed in DBIx::Class::ResultSet to the constructor. Values are set and retrieved from the row using the following logic: If there is an accessor, use it, if not, see if it has a column, use inflated_columns methods, if not die. So directives defined in the map for reading and writing should match either accessors or column names
is: ro, isa: DBIx::Class::ResultSet, required: 1
This attribute holds the active ResultSet that should be used when creating new rows
is: ro, isa: Bool, default: false
During the execution of the "epilogue", this attribute is checked to see if the newly created and populated instance should be inserted into the database
is: ro, isa: CodeRef, lazy: 1, builder: _build_new_instance
This attribute overrides what is provided in Data::Morph::Role::Backend and uses a builder method that returns a coderef that uses "result_set" to return a new row using "new_result" in DBIx::Class::ResultSet
This is the builder method for "new_instance". If special logic is needed in creation of the instance factory, simply override or advise this method as needed. By default, it returns a CodeRef that builds DBIx::Class::Row objects using "new_result" in DBIx::Class::ResultSet upon the "result_set"
Nicholas R. Perez <firstname.lastname@example.org>
This software is copyright (c) 2011 by Nicholas R. Perez <email@example.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.