You can configure Doctrine models with a high degree of flexibility.. if you
check out the documentation for Doctrine (specifically
http://www.doctrine-project.org/projects/orm/1.2/docs/manual/defining-models/en#columns:column-aliases)
you can see that you can pretty well map columns to field names in whatever
way you want.

As for obstables, you are obviously going to run into mis matched column
names and trying to make sense of a confusing data model.. it's a bit
difficult to forecast everything (particularly because I haven't really run
into anything like this before).

I'm sure someone else will have more information.. if you have any other
more specific questions that would be nice.. the question you asked is a bit
hard to answer imo, but in general I would suggest coming up with a scheme
that reflects the intended relationships of the database schema you are
working with and use the doctrine aliasing and mapping to hide the obscure
database column names from the rest of the application by mapping them into
your model scheme. Abstraction will be a key part of how you get this to
integrate into symfony.

On Wed, Nov 3, 2010 at 04:24, brillenfux <[email protected]>wrote:

> Hi,
>
> I have to integrate a very bad legacy database and I'd have to specify
> things in the model extensively. There are fields (like contact_id)
> that are named inconsistently all through the database for example
> (like contact, contactid, Contact, Kontakt, KontaktID etc.) also there
> are fields with random names (like "ext" which is in fact a group_id
> field).
> How many of the field references in the code etc are hard-coded? How
> extensively can I design the model. What obstacles will I see?
> Is there a something comprehensive to read about that topic?
>
> Thanks,
> Enno
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<symfony-users%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
Alex Pilon
(613) 608-1480

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to