コード例 #1
0
 /**
  * Filter the query by a related MeshingSchema object
  *
  * @param     MeshingSchema|PropelCollection $meshingSchema The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return    MeshingSchemaTableQuery The current query, for fluid interface
  */
 public function filterByMeshingSchema($meshingSchema, $comparison = null)
 {
     if ($meshingSchema instanceof MeshingSchema) {
         return $this->addUsingAlias(MeshingSchemaTablePeer::SCHEMA_ID, $meshingSchema->getId(), $comparison);
     } elseif ($meshingSchema instanceof PropelCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(MeshingSchemaTablePeer::SCHEMA_ID, $meshingSchema->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByMeshingSchema() only accepts arguments of type MeshingSchema or PropelCollection');
     }
 }