If you simply copy your schema from your plugin to your project schema
folder then you can customize the schema.

Then you can just add "connection: conn_name" to the top of the schema file
or within the models you wish to bind to a certain connection.

- Jon

On Mon, Oct 6, 2008 at 10:53 AM, Thomas Rabaix <[EMAIL PROTECTED]>wrote:

>
> Hello,
>
> I have not try this with doctrine. Cannot say...
>
> Thomas
>
> On Mon, Oct 6, 2008 at 5:34 PM, Lee Bolding <[EMAIL PROTECTED]> wrote:
> >
> > Thanks Thomas, that looks promising.
> >
> > How do I bind sfGuard* to a different database though?
> >
> > At the moment I've got something like this in my
> > frontendConfiguration.class.php - but haven't yet tried it
> >
> > class ProjectConfiguration extends sfProjectConfiguration
> > {
> >   public function setup()
> >   {
> >     Doctrine_Manager::connection('mysql://root:[EMAIL PROTECTED]/
> > global', 'global');
> >     Doctrine_Manager::bindComponent('sfGuardUser', 'global');
> >   }
> > }
> >
> > Hopefully I'll be able to test that out tomorrow. Presumably, if I
> > bind only sfGuardUser, the other objects in sfGuardPlugin will remain
> > bound to my database containing all the other data? (this is what I
> > want to happen).
> >
> > Cheers
> >
> > Lee
> >
> > On 6 Oct 2008, at 16:07, Thomas Rabaix wrote:
> >
> >>
> >> Hello,
> >>
> >> If you want to had custom fields into the model, you can overwrite the
> >> setTableDefinition and setUp method on the generated class.
> >>
> >> Thomas
> >>
> >> On Mon, Oct 6, 2008 at 4:38 PM, Lee Bolding <[EMAIL PROTECTED]> wrote:
> >>>
> >>> Hi gang,
> >>>
> >>> I've just taken the leap and upgraded to both Symfony 1.1 and
> >>> Doctrine
> >>> for a new project I'm working on.
> >>>
> >>> So far, so good - learning curve for Doctrine doesn't seem that
> >>> steep,
> >>> and haven't yet got to the point of having fun with the new forms and
> >>> validators stuff in Symfony 1.1
> >>>
> >>> Anyway, I'm using the sfGuardDoctrinePlugin - but, here's the catch -
> >>> my users data is stored in a separate database to the rest of the
> >>> data
> >>> for my application, and it's a legacy database that I can't change
> >>> the
> >>> schema on.
> >>>
> >>> So, what I really need to do is utilise the component binding
> >>> functionality of Doctrine, but also use the sfPropelAlternativeSchema
> >>> plugin to change the schema of the sfGuard plugin - but, it's a
> >>> Propel
> >>> plugin, not a Doctrine one. I think to get around that I'll have to
> >>> bite the bullet and manually change the schema for the plugin...
> >>> but I
> >>> can't see that I (or anyone else) will ever upgrade this plugin once
> >>> the application is deployed and working.
> >>>
> >>> So, my question is : how do I configure Doctrine component binding
> >>> via
> >>> YAML? or do I need to do this in a config file such as
> >>> ProjectConfiguration.class.php?
> >>>
> >>> Once that's done, how do I make my 'users' component available to use
> >>> in my YAML for my other models?
> >>>
> >>> Thanks in advance....
> >>>
> >>>
> >>>
> >>>>
> >>>
> >>
> >>
> >>
> >> --
> >> Thomas Rabaix
> >> Internet Consultant
> >>
> >> >
> >
> >
> > >
> >
>
>
>
> --
> Thomas Rabaix
> Internet Consultant
>
> >
>


-- 
Jonathan H. Wage
Open Source Software Developer & Evangelist
http://www.jwage.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