[FLOW3-general] Build an Flow-Application on an existing Oracle database

Regine Rosewich regine.rosewich at hoellenberg.biz
Thu Jan 3 15:54:48 CET 2013


Hi Axel,

as David wrote, it is relatively easy to use Doctrine for native
SQL-Queries. If the tables or views you query with a native SQL-Query are
not represented as an object (.../Classes/Domain/Model...) in your
application you won't get any problem with updates or migrations.
Nevertheless is it necessary to use a repository-class for the queries
(.../Classes/Domain/Repository...). So you either have to create a dummy
model-class for your native query - an so be able to create an according
repository - or use an existing repository.

The native query then works rather simple

$nQuery = '<here you write the query statement as you would in native MySql
- or you concatenate the query from other variables ->';
$stmt = $this->getEntityManager()
	  ->getConnection()
	  ->prepare($nQuery);
$stmt->execute();
return $stmt->fetchAll(2); <fetchAll(2) returns the result as an array ->
see Doctrine Documentation for other possibilities)

Hope it is useful

Regine

> -----Ursprüngliche Nachricht-----
> Von: flow3-general-bounces at lists.typo3.org [mailto:flow3-general-
> bounces at lists.typo3.org] Im Auftrag von Qbus | Axel Wüstemann
> Gesendet: Donnerstag, 3. Januar 2013 11:40
> An: flow3-general at lists.typo3.org
> Betreff: [FLOW3-general] Build an Flow-Application on an existing
> Oracle database
> 
> Hi,
> 
> in about 2008 we built an application with Zend Framework 1 (ZF), using
> an existing Oracle database. The database is part of the ERP-Software
> of the customer.
> 
> Now it is planned to rebuild this application. Because ZF2 is a quite
> complete new implementation, it might be considered to use Flow
> instead.
> 
> For some parts of the app we have to use given database views, only for
> reading an displaying the data. So we can't use doctrine's database
> updates, migrations, table structures etc.
> 
> What would be the right strategy related to persistence in this case?
> Should we use the Flow's Generic Persistence?
> 
> Thank you,
> Axel
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general




More information about the FLOW3-general mailing list