doctrine/orientdb-odm — pull request #171 by odino (2014-01-10 21:06:53+00:00)
Title: fixed bug where 2 requests with different methods would trigger 2 reques...

...ts with the same HTTP method

@nrk superweird, I have this code:

```
public function execute(InputInterface $input, OutputInterface $output)
{
$databaseName = sprintf("sharah_%s", $input->getOption('env'));
$orientdb = $this->getOrientDB();

$output->writeln(sprintf('Preparing to recreate database "%s"', $databaseName));
$databases = $this->listDatabases($output);

if (in_array($databaseName, $databases)) {
$output->writeln(sprintf('the database "%s" exists, will be deleted', $databaseName));
$orientdb->deleteDatabase($databaseName);
$output->writeln(sprintf('deleted database "%s"', $databaseName));
} else {
$output->writeln(sprintf('database "%s" was not found, will be created from scratch', $databaseName));
}

$output->writeln(sprintf('creating database "%s"', $databaseName));

$orientdb->createDatabase($databaseName);
$output->writeln(sprintf('database "%s" was succesfully created', $databaseName));

$this->listDatabases($output);
}

protected function listDatabases(OutputInterface $output)
{
$databases = $this->getOrientDB()->listDatabases()->getData()->databases;

$output->writeln(sprintf('Found (%d) databases:', count($databases)));

foreach ($databases as $database) {
$output->writeln(sprintf(' * "%s"', $database));
}

return $databases;
}

/**
* @return HttpBinding
*/
public function getOrientDB()
{
return $this->getContainer()->get('orientdb.binding');
}
```

When the database is already there, the second call to `listDatabases` would be executes as a `DELETE` by the HTTP binding:

```
2014-01-11 01:01:36:209 WARN ->127.0.0.1: Command not found: DELETE.listDatabases [ONetworkProtocolHttpDb]
```