NAME Fey::ORM - A Fey-based ORM SYNOPSIS A "table-based" class
for the User table: package MyApp::Model::User; use
MyApp::Model::Schema; use Fey::ORM::Table; my $schema =
MyApp::Model::Schema->Schema(); has_table
$schema->table('User'); has_one $schema->table('Group');
has_many 'messages' => ( table => $schema->table('Messages') );
`MyApp::Model::Schema' might look like this: package
MyApp::Model::Schema; use Fey::DBIManager::Source; use
Fey::Loader; use Fey::ORM::Schema; my $source =
Fey::DBIManager::Source->new( dsn => 'dbi:Pg:dbname=MyApp', user
=> 'myapp', ); my $schema = Fey::Loader->new( dbh =>
$source->dbh() )->make_schema(); has_schema $schema;
__PACKAGE__->DBIManager()->add_source($source); Then in your
application: use MyApp::Model::User; my $user =
MyApp::Model::User->new( user_id => 1 ); print
$user->username(); $user->update( username => 'bob' );
DESCRIPTION Fey::ORM builds on top of other Fey project
libraries to create an ORM focused on easy SQL generation. This
is an ORM for people who are com