protected function writeRecords($tableNames) { $schema = new MeshingSchema(); $schema->setName($this->opts->name); $schema->setInstalledAt(time()); $schema->save(); foreach ($tableNames as $tableName) { $schemaTable = new MeshingSchemaTable(); $schemaTable->setMeshingSchema($schema); $schemaTable->setName($tableName); $schemaTable->save(); } }
/** * Filter the query by a related MeshingSchemaTable object * * @param MeshingSchemaTable $meshingSchemaTable the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MeshingSchemaQuery The current query, for fluid interface */ public function filterByMeshingSchemaTable($meshingSchemaTable, $comparison = null) { if ($meshingSchemaTable instanceof MeshingSchemaTable) { return $this->addUsingAlias(MeshingSchemaPeer::ID, $meshingSchemaTable->getSchemaId(), $comparison); } elseif ($meshingSchemaTable instanceof PropelCollection) { return $this->useMeshingSchemaTableQuery()->filterByPrimaryKeys($meshingSchemaTable->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByMeshingSchemaTable() only accepts arguments of type MeshingSchemaTable or PropelCollection'); } }
/** * Exclude object from result * * @param MeshingSchemaTable $meshingSchemaTable Object to remove from the list of results * * @return MeshingSchemaTableQuery The current query, for fluid interface */ public function prune($meshingSchemaTable = null) { if ($meshingSchemaTable) { $this->addUsingAlias(MeshingSchemaTablePeer::ID, $meshingSchemaTable->getId(), Criteria::NOT_EQUAL); } return $this; }