You only ever generate your schema once. Right at the beginning of the
project. So you only have to do the renaming of the models and table names
once.

- Jon

On Mon, Apr 13, 2009 at 10:17 AM, dancablam <danhstev...@gmail.com> wrote:

>
> Hi Jonathan,
>
> Assuming I understand you correctly, that approach won't help me when
> I generate-schema, only after. What I'm hoping for is a configuration
> parameter that will allow me to generate-schema and have that task
> generate the unique model names. Otherwise the non-unique model names
> are skipped and I have to manually key them into the schema.yml file
> which is a beast of a task because of the number of tables and number
> of fields in each table. Is there a parameter that I can set either in
> ProjectConfiguration.class.php or database.yml that can prepend
> something like Db1User, Db2User to the respective user models so that
> generate-schema will populate the schema.yml file correctly?
>
> Cheers,
> ~Dan
>
> On Apr 13, 10:03 am, Jonathan Wage <jonw...@gmail.com> wrote:
> > You can change the model name then use the tableName property to set the
> > table name.
> >
> > User:
> >   tableName: users
> >
> > or in php
> >
> > public function setTableDefinition()
> > {
> >     $this->setTableDefinition('users');
> >
> > - Jon
> >
> > On Mon, Apr 13, 2009 at 9:55 AM, Daniel Stevens <danhstev...@gmail.com
> >wrote:
> >
> >
> >
> > > Hi everyone,
> >
> > > I have a project that I'm converting to Doctrine that uses three
> databases.
> > > Some of those databases have the same table names (ie: two of the
> databases
> > > each have a 'user' table). When I generate the schema doctrine simply
> > > generates the User class and fields for one of the databases and
> ignores the
> > > other one. I know in Propel you could set a PhpName that would allow
> you to
> > > name the table classes whatever you wanted (ie: Db1User, Db2User, etc).
> I
> > > can't seem to find documentation on how to do this in Doctrine (aside
> from
> > > manually typing out the schema.yml and not using generate-schema which
> would
> > > be an arduous and ongoing headache). Does anyone know how to do this? I
> > > tried setting Doctrine::ATTR_TBLCLASS_FORMAT for some of the databases
> but
> > > symfony claimed that was an "Unkown Attribute".
> >
> > > Thanks guys,
> > > ~Dan
> >
> > --
> > Jonathan H. Wage
> > Open Source Software Developer &
> Evangelisthttp://www.jwage.comhttp://www.doctrine-project.orghttp://
> www.symfony-project.org
> >
>


-- 
Jonathan H. Wage
Open Source Software Developer & Evangelist
http://www.jwage.com
http://www.doctrine-project.org
http://www.symfony-project.org

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

Reply via email to