/** * Exclude object from result * * @param MeshingSchema $meshingSchema Object to remove from the list of results * * @return MeshingSchemaQuery The current query, for fluid interface */ public function prune($meshingSchema = null) { if ($meshingSchema) { $this->addUsingAlias(MeshingSchemaPeer::ID, $meshingSchema->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Declares an association between this object and a MeshingSchema object. * * @param MeshingSchema $v * @return P2POwnNode The current object (for fluent API support) * @throws PropelException */ public function setMeshingSchema(MeshingSchema $v = null) { if ($v === null) { $this->setSchemaId(NULL); } else { $this->setSchemaId($v->getId()); } $this->aMeshingSchema = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the MeshingSchema object, it will not be re-added. if ($v !== null) { $v->addP2POwnNode($this); } return $this; }
/** * 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'); } }
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(); } }
/** * Creates a new KnownNode for node models * * @param PropelPDO $con PDO connection object * @return TestModelKnownNode */ protected function createKnownNode(BaseObject $node, PropelPDO $con = null) { $this->initConnections(); // Look up schema, and create an empty one if required $schema = MeshingSchemaQuery::create()->findOneByName($this->package, $this->conSystem); if (!$schema) { $schema = new MeshingSchema(); $schema->setName($this->package); $schema->setInstalledAt(time()); $schema->save($this->conSystem); } /* @var $node TestModelKnownNode */ $node->setName('Us!'); $node->setFqdn('http://example.com/path'); $node->setSchemaId($schema->getId()); $node->save($con); return $node; }