Created
November 9, 2011 22:20
-
-
Save leblanc-simon/1353309 to your computer and use it in GitHub Desktop.
propel example bug with query_cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Project name | |
propel.project = OpenSondage | |
# Database driver | |
propel.database = mysql | |
propel.mysql.tableType = MyISAM | |
propel.mysql.tableEngineKeyword = ENGINE | |
propel.tablePrefix = | |
################################################# | |
# | |
# DON'T EDIT AFTER THIS LINE | |
# | |
################################################# | |
# Directory | |
propel.conf.dir = ${propel.project.dir} | |
propel.runtime.conf.file = runtime-conf.xml | |
propel.phpconf.dir = ${propel.project.dir} | |
propel.schema.dir = ${propel.project.dir} | |
propel.output.dir = ${propel.project.dir}/model | |
propel.php.dir = ${propel.output.dir}/classes | |
propel.sql.dir = ${propel.output.dir}/sql | |
# Schema options | |
propel.packageObjectModel = true | |
propel.namespace.autoPackage = true | |
propel.schema.validate = true | |
# Generate options | |
propel.addGenericAccessors = true | |
propel.addGenericMutators = true | |
propel.addTimeStamp = false | |
propel.addValidateMethod = true | |
propel.addIncludes = false | |
propel.addHooks = true | |
propel.basePrefix = Base | |
propel.useLeftJoinsInDoJoinMethods = true | |
# Date | |
propel.useDateTimeClass = true | |
propel.dateTimeClass = DateTime | |
propel.defaultTimeStampFormat = Y-m-d H:i:s | |
propel.defaultDateFormat = %x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
try { | |
// Include the main Propel script | |
require_once __DIR__.'/vendor/propel/runtime/lib/Propel.php'; | |
// Initialize Propel with the runtime configuration | |
Propel::init(__DIR__."/OpenSondage-conf.php"); | |
// Add the generated 'classes' directory to the include path | |
set_include_path(__DIR__."/model/classes" . PATH_SEPARATOR . get_include_path()); | |
$poll = OpenSondage\Database\PollQuery::create()->findOne(); | |
var_dump($poll); | |
} catch (Exception $e) { | |
var_dump($e->getMessage()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<database name="opensondage" defaultIdMethod="native" package="OpenSondage.Database" namespace="OpenSondage\Database"> | |
<table name="poll" phpName="Poll"> | |
<column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true"/> | |
<column name="name" type="VARCHAR" size="255" /> | |
<behavior name="query_cache" /> | |
</table> | |
</database> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment