Parent Directory | Revision Log
minimal possible example for another schema (with extracted common parts to Frey::Schema)
1 | package A3C::HrEduOrg; |
2 | |
3 | use A3C::Schema; |
4 | use Fey::ORM::Table; |
5 | |
6 | use Data::Dump qw/dump/; |
7 | |
8 | my $table = A3C::Schema->Schema()->table('hr_edu_orgs'); |
9 | |
10 | has_table( $table ); |
11 | |
12 | my $select = A3C::Schema->SQLFactoryClass()->new_select() |
13 | ->select( $table ) |
14 | ->from( $table ) |
15 | ->order_by( $table->column('id'), 'ASC' ) |
16 | ->limit(10) |
17 | ; |
18 | |
19 | has_many 'rows' => ( |
20 | table => $table, |
21 | select => $select, |
22 | ); |
23 | |
24 | #warn dump( map { $_->name } $users_table->columns ); |
25 | |
26 | 1; |
ViewVC Help | |
Powered by ViewVC 1.1.26 |