If you use truncate it also resets auto increment value to 1:

Truncate table_name;

On 2/8/09, krassswr krasssswr <[email protected]> wrote:
>
> http://trac.symfony-project.org/ticket/5820 .....
>  I have some kind of dirty hack.
> C:\xampp\php\PEAR\symfony\plugins\sfPropelPlugin\lib\vendor\propel-generator\classes\propel\engine\builder\sql\mysql\MysqlDDLBuilder.php
> row 161
> old version :
> $vendorSpecific =
> $dbVendorSpecific->getMergedVendorInfo($tableVendorSpecific);
> if ( $vendorSpecific->hasParameter('Charset') ) {
> new version :
> $vendorSpecific =
> $dbVendorSpecific->getMergedVendorInfo($tableVendorSpecific);
> $script .= " AUTO_INCREMENT=1";
> if ( $vendorSpecific->hasParameter('Charset') ) {
>
> then after each run of test need to run symfony propel:build-all-load
> this task re create /data/sql/lib.model.schema.sql
> and add this : Type=InnoDB AUTO_INCREMENT=1;
> this statement in table creation resets the id-s to 1 and then every thing
> start form beginig.
> If it is possible some one to help me out in investigateing more deep into
> propel, so we can make this commant :
>  alter table `jobeet`.`jobeet_job`  Engine=InnoDB checksum=1
> auto_increment=1 comment='' delay_key_write=1 row_format=dynamic
> charset=latin1 collate=latin1_swedish_ci
>
> to be executed when it is needet to deleteAll data in DB.
>
> On Sun, Feb 8, 2009 at 12:02 AM, krassswr krasssswr <[email protected]>wrote:
>
>> I continue to day 17 and I got other problem .... lucene didn't work as
>> expected.
>>
>> Now I follow the jobeet tutorial and I'm on day 17. Where we add lucene
>> search engine. Functional test are ok, but in browser I didn't get results
>> from searching.I even write my own test and it works as expected.... but
>> when I test searching in FireFox it didn't show any results...I'm starting
>> to think that tere is problem with configuration of my Apahe server ... in
>> some way it didn't allow php to read lucene index files ... or something
>> elese. Can anyone give me some point to continue in debuging my problem ?
>>
>> I found my problem. And... I understand where is the problem.
>> Every time you call symfony propel:data-load it rebuild tables anr re
>> populate them with data from fixtures, BUT it didn't reset AUTO_INCREMENT
>> counters in database ... so every time you run a test on symfony id-s of
>> things in database are changed.... so ludene needs to recreate index.
>>
>> Maybe I need to write automatic lucene index rebuilder .... or we need to
>> fix that problem with id's in database.
>>
>>
>> On Thu, Feb 5, 2009 at 9:24 PM, krassswr krasssswr <[email protected]>wrote:
>>
>>> I have solved my problem.
>>> The problem was simple.
>>> Every time when you run some tests, test is executing command symforny
>>> propel:data-load.
>>> That leads to load the fixtures files with data to database. I was missed
>>> to synchronize the data/fixtures and test/fixtures folders and that leads to
>>> empty "jobeet_category_affiliate" table.
>>> And second problem was wrong url that I try to access.
>>>
>>> Second integration with Zend_mail. It seems to work but can you give
>>> explanation how to configure mail account so in development process we can
>>> send mails.
>>>
>>> End of day 16 See you tomorrow.
>>> "
>>> Although, we wrote code for a read-only web service today, you have
>>> enough symfony knowledge to implement a read-write web service.
>>>
>>> The implementation of the affiliate account creation form in the frontend
>>> and its backend counterpart was really easy as you are now familiar with the
>>> process of adding new features to your project.
>>>
>>> If you remember requirements from day 2:
>>>
>>> "The affiliate can also limit the number of jobs to be returned, and
>>> refine his query by specifying a category."
>>>
>>> The implementation of this feature is so easy that we will let you do it
>>> tonight.
>>> "
>>> Please provide some kind of to do list like simple steps to do to
>>> accomplish the work.
>>> Something like: Create method for that, that take this arguments and
>>> return other kind of object. Then create some layout.... and so on ...
>>> instructions like this.
>>>
>>> And don't forget thank you for your answer Kris.
>>>
>>>
>>>
>>> On Wed, Feb 4, 2009 at 6:08 PM, krassswr krasssswr 
>>> <[email protected]>wrote:
>>>
>>>> /jobeet/apps/frontend/config/routing.yml
>>>>
>>>> # default rules
>>>> category:
>>>>   url:      /category/:slug.:sf_format
>>>>   class:    sfPropelRoute
>>>>   param:    { module: category, action: show, sf_format: html }
>>>>   options:  { model: JobeetCategory, type: object }
>>>>   requirements:
>>>>     sf_format: (?:html|atom)
>>>>
>>>> job:
>>>>   class:   sfPropelRouteCollection
>>>>   options:
>>>>     model:          JobeetJob
>>>>     column:         token
>>>>     object_actions: { publish: put, extend: PUT }
>>>>   requirements:
>>>>     token: \w+
>>>>
>>>> job_show_user:
>>>>   url:     /job/:company_slug/:location_slug/:id/:position_slug
>>>>   class:   sfPropelRoute
>>>>   options:
>>>>     model: JobeetJob
>>>>     type:  object
>>>>     method_for_criteria: doSelectActive
>>>>   param:   { module: job, action: show }
>>>>   requirements:
>>>>     id: \d+
>>>>     sf_method: [get]
>>>>
>>>> api_jobs:
>>>>   url:     /api/:token/jobs.:sf_format
>>>>   class:   sfPropelRoute
>>>>   param:   { module: api, action: list }
>>>>   options: { model: JobeetJob, type: list, method: getForToken }
>>>>   requirements:
>>>>     sf_format: (?:xml|json|yaml)
>>>>
>>>> affiliate:
>>>>   class:   sfPropelRouteCollection
>>>>   options:
>>>>     model: JobeetAffiliate
>>>>     actions: [new, create]
>>>>     object_actions: { wait: get }
>>>>
>>>> default_index:
>>>>   url:   /:module
>>>>   param: { action: index }
>>>>
>>>> default:
>>>>   url:   /:module/:action/*
>>>>
>>>> # default rules
>>>> homepage:
>>>>   url:   /
>>>>   param: { module: job, action: index }
>>>>
>>>> I have  checked routing and it seems ok. I found some other people have
>>>> similar problem and I try with  sfPropelRouteCollection insted of
>>>> sfPropelRoute .... no result. :(
>>>>
>>>>
>>>> On Tue, Feb 3, 2009 at 10:10 PM, Kris Wallsmith <
>>>> [email protected]> wrote:
>>>>
>>>>> It looks like you have an error in your application's routing.yml file.
>>>>> Revisit that part of the tutorial and double check you've included a
>>>>> "class:" entry under the appropriate route.
>>>>> Kris
>>>>>
>>>>> --
>>>>>
>>>>> *Kris Wallsmith* | Community Manager
>>>>> [email protected]
>>>>> Portland, Oregon USA
>>>>>
>>>>> http://twitter.com/kriswallsmith
>>>>>
>>>>> On Feb 3, 2009, at 11:29 AM, krassswr krasssswr wrote:
>>>>>
>>>>> Hi. I start to follow jobeet tutorial and I'm now on 16-th day.
>>>>> When I try to get Web Service to work I get error and I don't know how
>>>>> to solve my problem.
>>>>>
>>>>> The testing file maked for testing web service trough day 16, when I
>>>>> start it it works ok only first run. After each successful test run I need
>>>>> to make symfony propel:data-load and to recreate my testing admin user.
>>>>>
>>>>>
>>>>> http://localhost.jobeet.dev/frontend_dev.php/api/list/sensio_labs/jobs.xml
>>>>>
>>>>> Fatal error: Call to undefined method sfRoute::getObjects() in
>>>>> C:\xxx\htdocs\workspace\jobeet\apps\frontend\modules\api\actions\actions.class.php
>>>>> on line 15
>>>>> Call Stack
>>>>> #    Time    Memory    Function    Location
>>>>> 1    0.0258    62784    {main}( )    ..\frontend_dev.php:0
>>>>> 2    6.0707    7402120    sfContext->dispatch( )
>>>>> ..\frontend_dev.php:13
>>>>> 3    6.0707    7402248    sfFrontWebController->dispatch( )
>>>>> ..\sfContext.class.php:159
>>>>> 4    6.0830    7418992    sfController->forward( )
>>>>> ..\sfFrontWebController.class.php:48
>>>>> 5    6.4541    7805776    sfFilterChain->execute( )
>>>>> ..\sfController.class.php:245
>>>>> 6    6.4560    7813824    sfRenderingFilter->execute( )
>>>>> ..\sfFilterChain.class.php:53
>>>>> 7    6.4560    7814216    sfFilterChain->execute( )
>>>>> ..\sfRenderingFilter.class.php:33
>>>>> 8    6.4581    7819360    sfCommonFilter->execute( )
>>>>> ..\sfFilterChain.class.php:53
>>>>> 9    6.4581    7820304    sfFilterChain->execute( )
>>>>> ..\sfCommonFilter.class.php:29
>>>>> 10    6.4602    7825752    sfExecutionFilter->execute( )
>>>>> ..\sfFilterChain.class.php:53
>>>>> 11    6.4606    7826840    sfExecutionFilter->handleAction( )
>>>>> ..\sfExecutionFilter.class.php:42
>>>>> 12    6.4607    7827328    sfExecutionFilter->executeAction( )
>>>>> ..\sfExecutionFilter.class.php:76
>>>>> 13    6.4608    7827672    sfActions->execute( )
>>>>> ..\sfExecutionFilter.class.php:90
>>>>> 14    6.4639    7836232    apiActions->executeList( )
>>>>> ..\sfActions.class.php:53
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
> >
>

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