fixed recursive_children cvterm function, and added tests for parents and children
[cxgn-corelibs.git] / lib / SGN / Schema / BlastAnnotation.pm
blob0a232e12f9e9ccd76ff472cb44fef93777fb8f07
1 package SGN::Schema::BlastAnnotation;
3 use strict;
4 use warnings;
6 use base 'DBIx::Class';
8 __PACKAGE__->load_components("Core");
9 __PACKAGE__->table("blast_annotations");
10 __PACKAGE__->add_columns(
11 "blast_annotation_id",
13 data_type => "integer",
14 default_value => "nextval('blast_annotations_blast_annotation_id_seq'::regclass)",
15 is_auto_increment => 1,
16 is_nullable => 0,
17 size => 4,
19 "apply_id",
21 data_type => "integer",
22 default_value => undef,
23 is_foreign_key => 1,
24 is_nullable => 1,
25 size => 4,
27 "apply_type",
28 { data_type => "integer", default_value => undef, is_nullable => 1, size => 4 },
29 "blast_target_id",
30 { data_type => "integer", default_value => undef, is_nullable => 1, size => 4 },
31 "n_hits",
32 { data_type => "integer", default_value => undef, is_nullable => 1, size => 4 },
33 "hits_stored",
34 { data_type => "integer", default_value => undef, is_nullable => 1, size => 4 },
35 "last_updated",
36 { data_type => "integer", default_value => undef, is_nullable => 1, size => 4 },
37 "host",
39 data_type => "character varying",
40 default_value => undef,
41 is_nullable => 1,
42 size => 20,
44 "pid",
45 { data_type => "integer", default_value => undef, is_nullable => 1, size => 4 },
47 __PACKAGE__->set_primary_key("blast_annotation_id");
48 __PACKAGE__->add_unique_constraint(
49 "blast_annotations_apply_id_blast_target_id_uq",
50 ["apply_id", "blast_target_id"],
52 __PACKAGE__->belongs_to(
53 "apply",
54 "SGN::Schema::Unigene",
55 { unigene_id => "apply_id" },
56 { join_type => "LEFT" },
58 __PACKAGE__->has_many(
59 "blast_hits",
60 "SGN::Schema::BlastHit",
61 { "foreign.blast_annotation_id" => "self.blast_annotation_id" },
65 # Created by DBIx::Class::Schema::Loader v0.04999_07 @ 2009-09-04 13:21:55
66 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:c25ns20ozFJhtQvjZZXq3Q
69 # You can replace this text with custom content, and it will be preserved on regeneration