Simon R Jones schrieb:
This is suboptimal for production because you insert yet another
layer (parsing)
impacting on performance. You'd better have a generator divided in
two parts.
One to read database schema and one to output it, so the second can
be made
to output php code or xml plus php code to parse it.
Fair point. My idea is really guided by trying to keep the configuration of
such a db mapping file as simple as possible since db automation will likely
be a very popular core feature that new users will use in ZF.
Personally, I prefer the "convention-over-configuration" style anyway
these days. Too much configuration always leads to confusion. Thus, my
own ActiveRecord resembles the one found in Ruby On Rails in that it
makes assumptions about how the database schema is organized. This makes
it very easy to get started with a fresh schema, no configuration is
required other than specifying the connection DSN.
It becomes more difficult when trying to use a legacy schema where you
have no influence in the naming of your table columns.
CU
Markus