Docs updated
This commit is contained in:
parent
eb0eb44dbd
commit
bc3c8c2eb8
@ -381,6 +381,8 @@ final class Doctrine {
|
||||
$fp = fopen(self::$path.DIRECTORY_SEPARATOR.'Doctrine.compiled.php', 'w+');
|
||||
fwrite($fp, "<?php
|
||||
".implode('', $ret)."
|
||||
class InvalidKeyException extends Exception { }
|
||||
class DQLException extends Exception { }
|
||||
?>");
|
||||
fclose($fp);
|
||||
}
|
||||
|
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
$query = new Doctrine_RawSql($session);
|
||||
|
||||
$query->parseQuery("SELECT {entity.*}, {phonenumber.*}
|
||||
FROM entity
|
||||
LEFT JOIN phonenumber
|
||||
ON phonenumber.entity_id = entity.id");
|
||||
|
||||
$query->addComponent("entity", "Entity");
|
||||
$query->addComponent("phonenumber", "Phonenumber");
|
||||
|
||||
$entities = $query->execute();
|
||||
?>
|
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
class User extends Doctrine_Record {
|
||||
public function setTableDefinition() {
|
||||
$this->hasColumn("uid","integer",20,"primary|autoincrement");
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,4 @@
|
||||
Doctrine supports many kind of identifiers. For most cases it is recommended not to
|
||||
specify any primary keys (Doctrine will then use field name 'id' as an autoincremented
|
||||
primary key). When using table creation Doctrine is smart enough to emulate the
|
||||
autoincrementation with sequences and triggers on databases that doesn't support it natively.
|
@ -1,6 +1,10 @@
|
||||
<?php
|
||||
class Doctrine_AccessTestCase extends Doctrine_UnitTestCase {
|
||||
public function prepareData() { }
|
||||
public function prepareTables() {
|
||||
$this->tables = array("Entity", "User");
|
||||
parent::prepareTables();
|
||||
}
|
||||
public function testOffsetMethods() {
|
||||
$user = new User();
|
||||
$this->assertEqual($user["name"],null);
|
||||
|
@ -2,6 +2,12 @@
|
||||
require_once("UnitTestCase.php");
|
||||
|
||||
class Doctrine_BatchIteratorTestCase extends Doctrine_UnitTestCase {
|
||||
|
||||
public function prepareTables() {
|
||||
$this->tables = array("Entity", "User","Group","Address","Phonenumber");
|
||||
parent::prepareTables();
|
||||
}
|
||||
|
||||
public function testIterator() {
|
||||
$graph = new Doctrine_Query($this->session);
|
||||
$entities = $graph->query("FROM Entity");
|
||||
|
@ -1,5 +1,10 @@
|
||||
<?php
|
||||
require_once("../Doctrine.compiled.php");
|
||||
require_once("../Doctrine.php");
|
||||
|
||||
Doctrine::compile();
|
||||
|
||||
//require_once("../Doctrine.compiled.php");
|
||||
|
||||
|
||||
//Doctrine::loadAll();
|
||||
function __autoload($class) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user