소스 검색

Altered bundle class to have accession available

Stephen Ficklin 7 년 전
부모
커밋
794b09af5d
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 1
      tripal/includes/TripalBundle.inc
  2. 1 1
      tripal/tripal.install

+ 3 - 1
tripal/includes/TripalBundle.inc

@@ -7,6 +7,8 @@ class TripalBundle extends Entity {
   public function __construct($values = array(), $entity_type) {
     parent::__construct($values, $entity_type);
 
+    $this->term = tripal_load_term_entity(array('term_id' => $bundle->term_id));
+    $vocab = $term->vocab;
+    $this->accession = $vocab->vocabulary . ':' . $term->accession;
   }
-
 }

+ 1 - 1
tripal/tripal.install

@@ -370,7 +370,7 @@ function tripal_tripal_collection_bundle_schema() {
         'not null' => TRUE
       ),
       'collection_id' => array(
-        'type' => 'varchar',
+        'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE
       ),