Models classes

2 views
Skip to first unread message

Alexandru-Emil Lupu

unread,
Mar 12, 2010, 7:34:24 AM3/12/10
to sfs...@googlegroups.com
Hi!

I cannot find:
- productPeer::retrieveById()
- BrandPeer::doSelectWithTranslation()

did anyone made this set of functions ?
So, i am thinking to do them ... but i dunno if someone did them allready ...

Also, for the project i would like you to backup all your 1.4 model classes, and regenerate the objects... I am preety sure that symfony would generate a 3rd layer for them (Plugin***  one), where i do recommend to put all the work. This way, we allow further user to customize their methods if the need to ...

Alecs

--
Have a nice day!

Alecs
Certified ScrumMaster

There are no cannibals alive! I have ate the last one yesterday ...  
I am on web:  http://www.alecslupu.ro/
I am on twitter: http://twitter.com/alecslupu
I am on linkedIn: http://www.linkedin.com/in/alecslupu
Tel: (+4)0722 621 280

Sébastien HEITZMANN

unread,
Mar 12, 2010, 7:42:28 AM3/12/10
to sfs...@googlegroups.com
I have just done someone.

I've focused on the admin part for the moment.

I commit what i have for the moment.

Alexandru-Emil Lupu a �crit :

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

Alexandru-Emil Lupu

unread,
Mar 12, 2010, 7:42:54 AM3/12/10
to sfs...@googlegroups.com
ok

On Fri, Mar 12, 2010 at 2:42 PM, Sébastien HEITZMANN <2...@2le.net> wrote:
I have just done someone.

I've focused on the admin part for the moment.

I commit what i have for the moment.



Alexandru-Emil Lupu a écrit :

Andreas Nyholm

unread,
Mar 12, 2010, 8:00:34 AM3/12/10
to sfs...@googlegroups.com
These are generated with sfsPeerBuilder. Now I can not say how propel
1.4 is working, let me investigate. I suspect these should not be added
manually.

I noticed you overwrote some of Alecs changes in one commit. I will take
a look at that.

/Andreas

Alexandru-Emil Lupu

unread,
Mar 12, 2010, 8:04:28 AM3/12/10
to sfs...@googlegroups.com
i am investigating the problem ...
let me handle it ...
A

On Fri, Mar 12, 2010 at 3:00 PM, Andreas Nyholm <nyholms...@gmail.com> wrote:
These are generated with sfsPeerBuilder. Now I can not say how propel 1.4 is working, let me investigate. I suspect these should not be added manually.

I noticed you overwrote some of Alecs changes in one commit. I will take a look at that.

/Andreas


Sébastien HEITZMANN wrote:
I have just done someone.

I've focused on the admin part for the moment.

I commit what i have for the moment.



Alexandru-Emil Lupu a écrit :

Andreas Nyholm

unread,
Mar 12, 2010, 8:04:20 AM3/12/10
to sfs...@googlegroups.com
About the overwriting?

Alexandru-Emil Lupu wrote:
> i am investigating the problem ...
> let me handle it ...
> A
>
> On Fri, Mar 12, 2010 at 3:00 PM, Andreas Nyholm
> <nyholms...@gmail.com <mailto:nyholms...@gmail.com>> wrote:
>
> These are generated with sfsPeerBuilder. Now I can not say how
> propel 1.4 is working, let me investigate. I suspect these should
> not be added manually.
>
> I noticed you overwrote some of Alecs changes in one commit. I will
> take a look at that.
>
> /Andreas
>
>
> S�bastien HEITZMANN wrote:
>
> I have just done someone.
>
> I've focused on the admin part for the moment.
>
> I commit what i have for the moment.
>
>
>

> Alexandru-Emil Lupu a �crit :

> <mailto:sfs...@googlegroups.com>.


> To unsubscribe from this group, send email to
> sfshop+un...@googlegroups.com

> <mailto:sfshop%2Bunsu...@googlegroups.com>.


> For more options, visit this group at
> http://groups.google.com/group/sfshop?hl=en.
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "sfshop" group.
> To post to this group, send email to sfs...@googlegroups.com

> <mailto:sfs...@googlegroups.com>.


> To unsubscribe from this group, send email to
> sfshop+un...@googlegroups.com

> <mailto:sfshop%2Bunsu...@googlegroups.com>.


> For more options, visit this group at
> http://groups.google.com/group/sfshop?hl=en.
>
>
>
>
> --
> Have a nice day!
>
> Alecs
> Certified ScrumMaster
>
> There are no cannibals alive! I have ate the last one yesterday ...
> I am on web: http://www.alecslupu.ro/
> I am on twitter: http://twitter.com/alecslupu
> I am on linkedIn: http://www.linkedin.com/in/alecslupu
> Tel: (+4)0722 621 280
>

Alexandru-Emil Lupu

unread,
Mar 12, 2010, 8:06:50 AM3/12/10
to sfs...@googlegroups.com
yes


On Fri, Mar 12, 2010 at 3:04 PM, Andreas Nyholm <nyholms...@gmail.com> wrote:
About the overwriting?

Alexandru-Emil Lupu wrote:
i am investigating the problem ...
let me handle it ...
A

On Fri, Mar 12, 2010 at 3:00 PM, Andreas Nyholm <nyholms...@gmail.com <mailto:nyholms...@gmail.com>> wrote:

   These are generated with sfsPeerBuilder. Now I can not say how
   propel 1.4 is working, let me investigate. I suspect these should
   not be added manually.

   I noticed you overwrote some of Alecs changes in one commit. I will
   take a look at that.

   /Andreas


   Sébastien HEITZMANN wrote:

       I have just done someone.

       I've focused on the admin part for the moment.

       I commit what i have for the moment.



       Alexandru-Emil Lupu a écrit :

Sébastien HEITZMANN

unread,
Mar 12, 2010, 8:11:18 AM3/12/10
to sfs...@googlegroups.com
I'm going to work on the admin i18n.

the admin_menu table is not i18n for the moment.

I think i will do it like the common menu.

SEB

Alexandru-Emil Lupu

unread,
Mar 12, 2010, 8:13:23 AM3/12/10
to sfs...@googlegroups.com
ok. please make a ticket and then assign yourself to it ...

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

Sébastien HEITZMANN

unread,
Mar 12, 2010, 8:15:08 AM3/12/10
to sfs...@googlegroups.com
Andreas Nyholm a �crit :

> These are generated with sfsPeerBuilder. Now I can not say how propel
> 1.4 is working, let me investigate. I suspect these should not be
> added manually.
I think that a lot of autogenerated function are not used in the
previous model. Maybe it's more clear to have them directly in the code.

The doctrine migration will also be easier.

Just my opinion.

SEB

Alexandru-Emil Lupu

unread,
Mar 12, 2010, 8:18:51 AM3/12/10
to sfs...@googlegroups.com
Agree ...

On Fri, Mar 12, 2010 at 3:15 PM, Sébastien HEITZMANN <2...@2le.net> wrote:
Andreas Nyholm a écrit :

These are generated with sfsPeerBuilder. Now I can not say how propel 1.4 is working, let me investigate. I suspect these should not be added manually.
I think that a lot of autogenerated function are not used in the previous model. Maybe it's more clear to have them directly in the code.

The doctrine migration will also be easier.

Just my opinion.

SEB

I noticed you overwrote some of Alecs changes in one commit. I will take a look at that.

/Andreas

Sébastien HEITZMANN wrote:
I have just done someone.

I've focused on the admin part for the moment.

I commit what i have for the moment.



Alexandru-Emil Lupu a écrit :

Andreas Nyholm

unread,
Mar 12, 2010, 9:26:11 AM3/12/10
to sfs...@googlegroups.com
I have been fixing this issue with Alecs. There are some errors in your
propel.ini. That's why they are not generated.

We should not add these manually to peer since they are generated in
BaseXXXPeer.

Code below from peer builder. As you see a lot of functions are
generated. You have only spotted a few missing. We will update the
propel.ini and then these will be generated.

if ($this->getTable()->getColumn('is_active') ||
$this->getTable()->getColumn('is_deleted')) {
$this->addAddAdminCriteria($script);
$this->addAddPublicCriteria($script);
}

if ($this->getTable()->getColumn('id')) {
$this->addGetById($script);
}

if ($this->getTable()->getAttribute('isI18n')) {
$this->addGetAllI18n($script);
$this->addGetAllPublicI18n($script);
$this->addGetCountAll($script);
$this->addDoSelectWithTranslation($script);
$this->addUpdateCulture($script);
}
else {
$this->addGetAll($script);
$this->addGetCountAll($script);
$this->addGetAllPublic($script);

Sébastien HEITZMANN

unread,
Mar 12, 2010, 10:40:32 AM3/12/10
to sfs...@googlegroups.com
Ok, this job is done.

I have put the French translation in the fixture file and splitted the admin.yml in two. One for the default admin and one for the menu system.

You need to rebuild the database to add the i18n table.

Yours

Sébastien HEITZMANN


Alexandru-Emil Lupu a écrit :

Andreas Nyholm

unread,
Mar 12, 2010, 11:07:33 AM3/12/10
to sfs...@googlegroups.com
Ok, great.

I would like to keep track of all schema changes to easier migrate my
own projects. If there will be many additions it's best to just create a
diff from database dump when we are ready. But for now please send a
message like this one when you do some changes.

Thanks!


S�bastien HEITZMANN wrote:
> Ok, this job is done.
>
> I have put the French translation in the fixture file and splitted the
> admin.yml in two. One for the default admin and one for the menu system.
>
> You need to rebuild the database to add the i18n table.
>
> Yours
>

> S�bastien HEITZMANN
>
>
> Alexandru-Emil Lupu a �crit :


>> ok. please make a ticket and then assign yourself to it ...
>>

>> On Fri, Mar 12, 2010 at 3:11 PM, S�bastien HEITZMANN <2...@2le.net
>> <mailto:2...@2le.net>> wrote:
>>
>> I'm going to work on the admin i18n.
>>
>> the admin_menu table is not i18n for the moment.
>>
>> I think i will do it like the common menu.
>>
>> SEB
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "sfshop" group.
>> To post to this group, send email to sfs...@googlegroups.com

>> <mailto:sfs...@googlegroups.com>.


>> To unsubscribe from this group, send email to
>> sfshop+un...@googlegroups.com

>> <mailto:sfshop%2Bunsu...@googlegroups.com>.

Sébastien HEITZMANN

unread,
Mar 12, 2010, 11:12:32 AM3/12/10
to sfs...@googlegroups.com
Ok I will do that.

For our own project, we do un upgrade script with the revision in the name.

upgrade-458.sql is to upgrade the database to the 458 revision.

I can do so if you want ?

Thanks.


Andreas Nyholm a �crit :


> Ok, great.
>
> I would like to keep track of all schema changes to easier migrate my
> own projects. If there will be many additions it's best to just create
> a diff from database dump when we are ready. But for now please send a
> message like this one when you do some changes.
>
> Thanks!
>
>

> S�bastien HEITZMANN wrote:
>> Ok, this job is done.
>>
>> I have put the French translation in the fixture file and splitted
>> the admin.yml in two. One for the default admin and one for the menu
>> system.
>>
>> You need to rebuild the database to add the i18n table.
>>
>> Yours
>>

>> S�bastien HEITZMANN
>>
>>
>> Alexandru-Emil Lupu a �crit :


>>> ok. please make a ticket and then assign yourself to it ...
>>>

>>> On Fri, Mar 12, 2010 at 3:11 PM, S�bastien HEITZMANN <2...@2le.net

Andreas Nyholm

unread,
Mar 12, 2010, 11:37:58 AM3/12/10
to sfshop
Ok. Thinking this trough, this is the case.

Peer builder will of course not work in sf1.4, so we need to get rid
of that one sooner or later.

You wrote: "I think that a lot of autogenerated function are not used
in the
previous model". Have you checked the amount? I do not know, you might
be correct, but I would not like to duplicate a lot of code. And
looking at my list above there will most likely be some duplications.

What are the options? Is this possible with behaviour?

As long as we stick to sf1.3 the peer builder work? I suggest we use
that one until we have a better solution or migrate to Doctrine.

Please tell me your opinion.

Regards,
Andreas

Andreas Nyholm

unread,
Mar 12, 2010, 11:39:27 AM3/12/10
to sfs...@googlegroups.com
That is a good idea. How do you create that one, manually? I use
postgre, so if you use mySQL the script would not work.

S�bastien HEITZMANN wrote:
> Ok I will do that.
>
> For our own project, we do un upgrade script with the revision in the name.
>
> upgrade-458.sql is to upgrade the database to the 458 revision.
>
> I can do so if you want ?
>
> Thanks.
>
>

> Andreas Nyholm a �crit :


>> Ok, great.
>>
>> I would like to keep track of all schema changes to easier migrate my
>> own projects. If there will be many additions it's best to just create
>> a diff from database dump when we are ready. But for now please send a
>> message like this one when you do some changes.
>>
>> Thanks!
>>
>>
>> S�bastien HEITZMANN wrote:
>>> Ok, this job is done.
>>>
>>> I have put the French translation in the fixture file and splitted
>>> the admin.yml in two. One for the default admin and one for the menu
>>> system.
>>>
>>> You need to rebuild the database to add the i18n table.
>>>
>>> Yours
>>>

>>> S�bastien HEITZMANN
>>>
>>>
>>> Alexandru-Emil Lupu a �crit :


>>>> ok. please make a ticket and then assign yourself to it ...
>>>>

>>>> On Fri, Mar 12, 2010 at 3:11 PM, S�bastien HEITZMANN <2...@2le.net

Sébastien HEITZMANN

unread,
Mar 12, 2010, 11:41:41 AM3/12/10
to sfs...@googlegroups.com
I agree. sf1.3 is ok for me. But this problem will stay if we have to move later.

Maybe a behavior is the solution. Much easier to do with doctrine than with propel.

For the moment we stay in 1.3

Yours


Andreas Nyholm a écrit :

Sébastien HEITZMANN

unread,
Mar 12, 2010, 12:10:58 PM3/12/10
to sfs...@googlegroups.com
For small things, we do it by hand.

It's true that the doctrine migration tool is better.


Andreas Nyholm a �crit :

> That is a good idea. How do you create that one, manually? I use
> postgre, so if you use mySQL the script would not work.
>

> S�bastien HEITZMANN wrote:
>> Ok I will do that.
>>
>> For our own project, we do un upgrade script with the revision in the
>> name.
>>
>> upgrade-458.sql is to upgrade the database to the 458 revision.
>>
>> I can do so if you want ?
>>
>> Thanks.
>>
>>

>> Andreas Nyholm a �crit :


>>> Ok, great.
>>>
>>> I would like to keep track of all schema changes to easier migrate
>>> my own projects. If there will be many additions it's best to just
>>> create a diff from database dump when we are ready. But for now
>>> please send a message like this one when you do some changes.
>>>
>>> Thanks!
>>>
>>>
>>> S�bastien HEITZMANN wrote:
>>>> Ok, this job is done.
>>>>
>>>> I have put the French translation in the fixture file and splitted
>>>> the admin.yml in two. One for the default admin and one for the
>>>> menu system.
>>>>
>>>> You need to rebuild the database to add the i18n table.
>>>>
>>>> Yours
>>>>

>>>> S�bastien HEITZMANN
>>>>
>>>>
>>>> Alexandru-Emil Lupu a �crit :


>>>>> ok. please make a ticket and then assign yourself to it ...
>>>>>

>>>>> On Fri, Mar 12, 2010 at 3:11 PM, S�bastien HEITZMANN <2...@2le.net

Sébastien HEITZMANN

unread,
Mar 12, 2010, 12:12:47 PM3/12/10
to sfs...@googlegroups.com

Maybe this plugin can solve our pb.

http://www.symfony-project.org/plugins/sfPropelSqlDiffPlugin

S�bastien HEITZMANN a �crit :


> For small things, we do it by hand.
>
> It's true that the doctrine migration tool is better.
>
>

> Andreas Nyholm a �crit :


>> That is a good idea. How do you create that one, manually? I use
>> postgre, so if you use mySQL the script would not work.
>>

>> S�bastien HEITZMANN wrote:
>>> Ok I will do that.
>>>
>>> For our own project, we do un upgrade script with the revision in
>>> the name.
>>>
>>> upgrade-458.sql is to upgrade the database to the 458 revision.
>>>
>>> I can do so if you want ?
>>>
>>> Thanks.
>>>
>>>

>>> Andreas Nyholm a �crit :


>>>> Ok, great.
>>>>
>>>> I would like to keep track of all schema changes to easier migrate
>>>> my own projects. If there will be many additions it's best to just
>>>> create a diff from database dump when we are ready. But for now
>>>> please send a message like this one when you do some changes.
>>>>
>>>> Thanks!
>>>>
>>>>
>>>> S�bastien HEITZMANN wrote:
>>>>> Ok, this job is done.
>>>>>
>>>>> I have put the French translation in the fixture file and splitted
>>>>> the admin.yml in two. One for the default admin and one for the
>>>>> menu system.
>>>>>
>>>>> You need to rebuild the database to add the i18n table.
>>>>>
>>>>> Yours
>>>>>

>>>>> S�bastien HEITZMANN
>>>>>
>>>>>
>>>>> Alexandru-Emil Lupu a �crit :


>>>>>> ok. please make a ticket and then assign yourself to it ...
>>>>>>

>>>>>> On Fri, Mar 12, 2010 at 3:11 PM, S�bastien HEITZMANN <2...@2le.net

Alexandru-Emil Lupu

unread,
Mar 12, 2010, 12:15:54 PM3/12/10
to sfs...@googlegroups.com

I agree... let's upgrade to sf 1.3. Fix the bugs that are...
And after that.. we move it to doctrine...
If we get bored... we add features

sent via htc magic

On Mar 12, 2010 6:41 PM, "Sébastien HEITZMANN" <2...@2le.net> wrote:

I agree. sf1.3 is ok for me. But this problem will stay if we have to move later.

Maybe a behavior is the solution. Much easier to do with doctrine than with propel.

For the moment we stay in 1.3

Yours


Andreas Nyholm a écrit :

> > Ok. Thinking this trough, this is the case. > > Peer builder will of course not work in sf1.4, ...

-- You received this message because you are subscribed to the Google Groups "sfshop" group. To pos...

Andreas Nyholm

unread,
Mar 12, 2010, 12:37:03 PM3/12/10
to sfs...@googlegroups.com
I tried one of the early version, but it did not work with postgreSQL. I
usually create changes manually and verify with this:
http://apgdiff.sourceforge.net/

Migrations with
http://www.symfony-project.org/plugins/sfPropelMigrationsLightPlugin

But let's not worry about migrations at this point. :)

Reply all
Reply to author
Forward
0 new messages