User Tools

Site Tools


kurs:doctrine_oracle_beipspiel

This is an old revision of the document!


<?php
// entities/Test.php
class Test {
  protected $id;
  protected $name;

  public function getName() {
        return $this->name;
  }

  public function setName($name) {
        $this->name = $name;
  }

  public function getId() {
        return $this->id;
  }
}

XML

<!-- config/xml/Test.dcm.xml -->
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
                    http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">

      <entity name="Test" table="tests">
          <id name="id" type="integer">
              <generator strategy="AUTO" />
          </id>

          <field name="name" type="string" />
      </entity>
</doctrine-mapping>
kurs/doctrine_oracle_beipspiel.1326967792.txt.gz · Last modified: 2014/09/10 21:22 (external edit)