<?php

require_once('bootstrap.php');

$conn = Doctrine_Manager::connection(DSN);

$Person = new Person();
$Person->name = "Peter";
$Person->address = "House 1";

$Car1 = new Car();
$Car1->brand = "Aston Martin";
$Car1->model = "DB7";

$Car2 = new Car();
$Car2->brand = "Ferrari";
$Car2->model = "458 Italia";

$Person->cars->add($Car1);
$Person->cars->add($Car2);

$Person->save();
$Car1->save();
$Car2->save();

echo("done");

?>                           