Why does a Element Criteria Model Query with Strings on a custom element type not filtering?
Found the answer, simple mistake.

if ($criteria-&gt;code) {
   $query-&gt;andWhere(DbHelper::parseParam('trips.code', $criteria-&gt;code, $query-&gt;params));
}


was needed along with 

public function defineCriteriaAttributes() {

    return array(
        'templateId'    =&gt; AttributeType::Mixed,
        'code'          =&gt; AttributeType::String,
    );
}


Hopes that helps anyone else who comes across something like this.