condition('CE.record_id', $record_id) ->execute() ->fetchObject(); } /** * A helper function that provides the Chado mapping table for the bundle. * * The tripal_chado module must map entities to their corresponding record * in Chado. Each bundl type has their own table for this mapping. This * function provides the name of the table given the bundle name. A mapping * table will only map to one table in Chado so the record_id's of the mapping * table should always be unique. * * @param $bundle * A bundle object (as retreieved from tripal_load_bundle_entity(). * * @return * The name of the mapping table that Chado uses to map entities to records. */ function tripal_chado_get_bundle_entity_table($bundle) { if (!$bundle) { return ''; } return 'chado_' . $bundle->name; }