Hi Gediminas,
In doctrine you can't really deal with objects, because you have to
use the schema.yml for generating the Objects and the DB.
If doctrine uses Objects to build the Db-schema, I should agree with
you and i'll forget tables.
Surfing on the web i have read something about Hybernate and it
generates the DB using the (Java) Objects; in the early versions it
used also a meta-file in xml to map the DB with the Objects, but this
is not used anymore.
Another consideration: if you write an object, this object will
remains the same even if you change the ORM version the you are using,
maybe you should only run an upgrading command, but your application
and the database should remain immutable.
>From Doctrine 1.x to Doctrine 2.x you can't do this, you have to re-
write the schema.yml, re-generate the object and (sometimes) the DB-
schema and in the end hope that the generated code is the same like
the previous version.
As i said in the xplo's answer, the schema.yml should be eliminated
and find a way to generate the DB starting from the Php-object, this
is the only way to forget tables.

Giovanni




On 30 Lug, 14:29, Gediminas Morkevicius
<gediminas.morkevic...@gmail.com> wrote:
> First of all if you use ORM you should never look at the tables in database.
> You should only deal with objects. Your problem is, that you think in
> tables, while you are using ORM. There is no more table relation, there is
> object relation. And how do you expect someone could easily migrate tables
> into objects?, its a different world, and annotation mapping is closest to
> it. Yaml and xml is also about schema if you are thinking in this way and
> ORM is not about schema, first of all its about relational objects, and the
> second how they are stored somethere
>
> On Sat, Jul 30, 2011 at 12:09 PM, Giovanni 
> <giovanni.possem...@gmail.com>wrote:
>
>
>
>
>
>
>
> > Hi zgoniaiko,
> > thanks for the answer.
> > I'm agree with you: it's matter of taste, but if in example you should
> > have to move from doctrine 1.x to 2.x, you have to rewrite the
> > schema.yml from scratch.
> > Instead, if you start from the DB-schema, you have to modify only some
> > rows on the schema.yml and rebuild the PHP-object (that should be the
> > same like in the previous version).
>
> > The "problem" is that only PHP Objects and DB-schema should
> > unchangeable from a older Doctrine version to another (otherwise your
> > application will not work), so the up-bottom approach should follow
> > this way:
>
> >        PHP-Object -> schema.yml -> DB-schema
>
> > and the bottom-up approach should follow this way (how it works now):
>
> >       DB-schema -> schema.yml -> PHP-Object
>
> > On you idea the actually up-bottom approach is not really correct
> > because it starts from a thing (the schema.yml file) that isn't
> > unchangable but it changes from a Doctrine version to another with the
> > following problem that you have to rewrite it.
>
> > Thank you a lot.
>
> > Giovanni
>
> > --
> > 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 developers" group.
> > To post to this group, send email to symfony-devs@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-devs+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-devs?hl=en

-- 
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 developers" group.
To post to this group, send email to symfony-devs@googlegroups.com
To unsubscribe from this group, send email to
symfony-devs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to