Hello,

Fair enough with your solution. The default base folder should be the
sf_root_dir and not the lib/model/doctrine. It is up to the dev to
define the full path.

It will be a great input to add this feature to 1.1 of doctrine ... or
maybe sooner. The current sfDoctrinePlugin has a bug, so an exception
must be raise with the package keyword is used ( and for my point of
view the generatePath feature should be implemented ).

When the 1.1 branch will be release ? does the 1.1 will break some
feature from 1.0 ?

Thanks for your insight.

Thomas

On Wed, Oct 15, 2008 at 9:11 PM, Jonathan Wage <[EMAIL PROTECTED]> wrote:
> The package feature in Doctrine is totally different than what it is in
> propel. The sfDoctrinePlugin uses the package feature so that it can work
> with symfony plugins natively. All of the schemas found in the plugins
> directory are automatically parsed and it adds the package parameter
> automatically so that the Doctrine model generator knows where to write the
> files and for the project and each of the plugins. So the package feature
> can't be used to do what you want, so we'll need to throw an exception when
> devs try and use it.
>
> For your problem I think we need to add a different feature to Doctrine
> schemas and the model generator to allow you to generate your models in to
> subfolders.
>
> User:
>   generatePath: SomeFolder/UserModels
>   columns:
>     username: string(255)
>
> This would write:
>
> lib/model/doctrine/SomeFolder/UserModels/User.class.php
> lib/model/doctrine/SomeFolder/UserModels/generated/BaseUser.class.php
>
> We can add this to Doctrine 1.1 release.
>
> Thoughts?
>
> - Jon
>
> On Wed, Oct 15, 2008 at 1:39 PM, Thomas Rabaix <[EMAIL PROTECTED]>
> wrote:
>>
>> I think, maybe other devs, it will be great to be able to separate
>> model into subfolder. If the project has more than 50 Models it will
>> be great to organize them by group. Another example is if we have
>> classes only used for a module, and we don't want to pollute the main
>> folder.
>>
>> The package feature is also implemented into Propel, so It will be a
>> great thing if both ORM have the same features.
>>
>> Maybe before creating a ticket, the community can share their thought
>> about that point.
>>
>>
>> On Wed, Oct 15, 2008 at 7:05 PM, Jonathan Wage <[EMAIL PROTECTED]> wrote:
>> > The package feature of Doctrine cannot be used by the user with
>> > sfDoctrinePlugin. We use the package feature internally for plugin
>> > schemas.
>> > I think we need to make the plugin throw an exception if you try and use
>> > that feature. Can you create a ticket to do that?
>> >
>> > - Jon
>> >
>> > On Wed, Oct 15, 2008 at 7:11 AM, Thomas Rabaix <[EMAIL PROTECTED]>
>> > wrote:
>> >>
>> >> Hello,
>> >>
>> >> I am using the package definition for a model in order to place the
>> >> generated model into a specific path. However, that does not work.
>> >>
>> >> ProductMySuperModel:
>> >>  package: lib.products
>> >>  [...]
>> >>
>> >> Generated files are located in SF_ROOT/lib/model/doctrine/lib/* which
>> >> is wrong AND Plugin*.class.php are also created in
>> >> SF_ROOT/plugin/lib/widgets/. I guess all files should be in
>> >> SF_ROOT/lib/widgets and it is not a plugin so plugin classes files
>> >> should NOT be generated.
>> >>
>> >> Look to me it is a critical bug, If so I will create a ticket.
>> >>
>> >> --
>> >> Thomas Rabaix
>> >> Internet Consultant
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Jonathan H. Wage
>> > Open Source Software Developer & Evangelist
>> > http://www.jwage.com
>> >
>> > >
>> >
>>
>>
>>
>> --
>> Thomas Rabaix
>> Internet Consultant
>>
>>
>
>
>
> --
> Jonathan H. Wage
> Open Source Software Developer & Evangelist
> http://www.jwage.com
>
> >
>



-- 
Thomas Rabaix
Internet Consultant

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" 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-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to