[FLOW3-general] FLOW3 Application on top of existing database
Alexander Dick
typo3 at dick.at
Wed Apr 25 17:19:21 CEST 2012
Hi Karsten,
Am 25.04.2012 11:08, schrieb Karsten Dambekalns:
> Hi.
>
> On 24.04.12 10:30, Alexander Dick wrote:
>> This existing application should be extended by another (independent)
>> FLOW3 application. The only thing is that I have to access it's database
>> tables and process the data - only for reading
>
> You create models with the properties as you need them to do the
> processing. Then you use the "Table" and "Column" annotations provided
> by Doctrine to map those properties to specific table and field names
> (if needed).
Alright, that sounds awesome, I think this will do it for me.
>
> For associations you can use "JoinTable" and "JoinColumn" annotations in
> pretty much the same way.
>
Yeah :-)
> For added safety you can declare your entities "ReadOnly" to make sure
> the existing data is really never changed.
>
Thanks for the hint, this is a good idea!
>> the new application has it's own persistence storage.
>
> Um, can you explain that? If that means you want to use two different
> databases simultaneously, your are out of luck. Right now FLOW3 doesn't
> do that…
I was a bit unclear, sorry. Actually we could handle it with only one
database, I just let FLOW3 create it's needed tables in the existing
database - that's possible I suppose.
>
> You can create models as usual for the "external" data and code a
> repository that connects directly to the existing database to read data.
> A bit more work, but a nice way to encapsulate that workaround and later
> easily refactor (when FLOW3 eventually supports multiple connections).
>
Can I work with a default repository? Since I will use only one database
there will be no special "connector" needed.
> Regards,
> Karsten
Thanks a lot!
Best regards
Alex
More information about the FLOW3-general
mailing list