| 
<?php//English: All the comments are first in english then in spanish
 //Español: Todos los comentarios están primero en inglés y luego en español
 include_once("class.ORM.php");
 include_once("config.ORM.php");
 include_once("class.Map.php");
 include_once("class.Driver.php");
 include_once("class.MySQL_Driver.php");
 include_once("class.Dummy_Map.php");
 include_once("class.Dummy.php");
 //Creating a dummy object
 //Creando un objeto tonto
 $dummy  = new Dummy(1, "A","B","C","D");
 $driver = new MySQL_Driver();
 $driver->set_debug(true);
 ORM::set_driver($driver);
 //Inserting 3 Dummy objects.
 //Insertando 3 objetos tontos
 ORM::insert($dummy);
 $dummy->set_id(2);
 ORM::insert($dummy);
 $dummy->set_id(3);
 ORM::insert($dummy);
 //Loading the second one...
 //Cargando el segundo objeto
 $dummy->set_id(2);
 ORM::load($dummy);
 //Updating the second one...
 //Actualizando el segundo...
 $dummy->set_field_1("E");
 $dummy->set_field_2("F");
 $dummy->set_field_3("G");
 $dummy->set_field_4("H");
 ORM::update($dummy);
 //Deleting the last one...
 //Eliminando el último...
 $dummy->set_id(3);
 ORM::delete($dummy);
 ?>
 |