ohhh I know what it is :)

Add this to the top of the plugin: "package:
sfDoctrineGuardPlugin.lib.model.doctrine"

This "package" option is automatically added to the schema files found in
plugins so that the models are all generated in the right places. When you
copy that schema file you just need to set that manually so they are
generated in the right place.

- Jon

On Fri, Mar 13, 2009 at 5:16 AM, Thomas Rabaix <thomas.rab...@gmail.com>wrote:

> I will advice you to symply overwrite the setTableDefinition of the
> generated class. As this will allow to tweak only some part of the model,
> and you will get less bugs when plugins is updated.
>
>
> On Fri, Mar 13, 2009 at 10:39 AM, Nicolas <nico.m...@gmail.com> wrote:
>
>>
>> I have looked more closely and what happens is that doctrine generates
>> the model of the customized schema file (sfGuardUser) in lib/model/
>> doctrine AND  generates another sfGuardUser class for the plugin in
>> lib/model/sfDoctrineGuardUser. I've tried to use the "package"
>> attribute in the customized schema to force doctrine to generate the
>> model in sfDoctrineGuardPlugin, but the package parameter is forbidden
>> in doctrine schema files.
>>
>> Anybody sees a workaround ?
>> Thanks,
>> Nicolas-
>>
>> On 12 mar, 17:50, Nicolas <nico.m...@gmail.com> wrote:
>> > I've already tried that:
>> >
>> > here is me customized schema for sfguarduser:
>> >
>> > sfGuardUser:
>> >   tableName: user
>> >   columns:
>> >     username:
>> >       type: string(45)
>> >       notnull: true
>> >       unique: true
>> >     algorithm:
>> >       type: string(6)
>> >       default: sha1
>> >       notnull: true
>> >     timezone:
>> >       type: integer(1)
>> >       notnull: true
>> >     culture:
>> >       type: string(7)
>> >       notnull: true
>> >     admin:
>> >       type: integer(1)
>> >       default: '0'
>> >       notnull: true
>> >     last_login: timestamp(25)
>> >
>> > i have defined it in a config/doctrine/sfGuardPlugin_schema.custom.yml
>> >
>> > and here is what i get when i run ./symfony doctrine:build-all-reload
>> > --no-confirmation:
>> >
>> > Fatal error: Cannot redeclare class BasesfGuardUser in /home/me/
>> > symfonyProjects/project/lib/model/doctrine/base/
>> > BasesfGuardUser.class.php on line 50
>> >
>> > and a call stack.
>> >
>> > What am i doing wrong ?
>> >
>> > Regards,
>> > Nicolas-
>> >
>> > On 12 mar, 16:29, Jonathan Wage <jonw...@gmail.com> wrote:
>> >
>> > > Just copy and paste the sfGuardUser schema to your
>> > > config/doctrine/schema.yml and it will override the one in the plugin.
>> >
>> > > - Jon
>> >
>> > > On Thu, Mar 12, 2009 at 5:52 AM, Nicolas <nico.m...@gmail.com> wrote:
>> >
>> > > > Hi all,
>> >
>> > > > I'm looking for a way to cleanly override à plugin schema file. My
>> > > > problem is that the column definitions of the sfGuardUser plugin
>> > > > doesn't fit my needs. Ideally i'd like to have something like this
>> > > >http://www.librosweb.es/symfony_1_1_en/capitulo17/plugins.htmlseethe
>> > > > "New in symfony 1.1: Customizing the plug-in schema" part. But this
>> is
>> > > > for propel and not doctrine.
>> > > > I know i could override the php setTable() definition, but if
>> possible
>> > > > i would like to have it in a yml file.
>> >
>> > > > Thanks,
>> > > > Nicolas-
>> >
>> > > --
>> > > Jonathan H. Wage
>> > > Open Source Software Developer &
>> Evangelisthttp://www.jwage.comhttp://www.doctrine-project.orghttp://www.symfony...
>>
>>
>
>
> --
> Thomas Rabaix
> http://rabaix.net
>
>
> >
>


-- 
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