示例#1
0
        }
        if ($criteria instanceof Criteria) {
            $criteria = clone $criteria;
            // rename for clarity
        } else {
            $criteria = $criteria->buildCriteria();
            // build Criteria from AdminLog object
        }
        if ($criteria->containsKey(AdminLogTableMap::ID) && $criteria->keyContainsValue(AdminLogTableMap::ID)) {
            throw new PropelException('Cannot insert a value for auto-increment primary key (' . AdminLogTableMap::ID . ')');
        }
        // Set the correct dbName
        $query = AdminLogQuery::create()->mergeWith($criteria);
        try {
            // use transaction because $criteria could contain info
            // for more than one table (I guess, conceivably)
            $con->beginTransaction();
            $pk = $query->doInsert($con);
            $con->commit();
        } catch (PropelException $e) {
            $con->rollBack();
            throw $e;
        }
        return $pk;
    }
}
// AdminLogTableMap
// This is the static code needed to register the TableMap for this table with the main Propel class.
//
AdminLogTableMap::buildTableMap();