[symfony-users] Re: Using subqueries under Doctrine

2010-03-17 Thread Tom Ptacnik
Did you try to google it? http://www.symfony-project.org/cookbook/1_2/en/retrieving_data_with_doctrine#chapter_f6fc97d827760d5157133eaf9798ddaf_sub_queries http://www.doctrine-project.org/documentation/manual/1_1/en/dql-doctrine-query-language:subqueries

RE: [symfony-users] Re: Using subqueries under Doctrine

2010-03-17 Thread NOOVEO - Christophe Brun
Yep, I already spotted the 2 last link but they were of no help. But I didn't found the first link, which is the one I needed. Thanks for the link ! -Message d'origine- De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De la part de Tom Ptacnik Envoyé :

[symfony-users] Override some sfConfig params

2010-03-17 Thread Romain Pouclet
Hi all, I'd like the webmaster of my application to be able to set the value of some config parameters, typically comments_moderation : true / false. It would be awesome if I could use it throught sfConfig class, anyway of doing that? I was about to create a parameters database, but I'd like

Re: [symfony-users] Override some sfConfig params

2010-03-17 Thread Marc Weistroff
If you look at the code of sfConfig (http://trac.symfony-project.org/browser/branches/1.4/lib/config/sfConfig.class.php), there is no way to save the changed value to the yaml or elsewhere. Also, if you change the app.yml config file in the prod env, you might have to clear the cache each time

Re: [symfony-users] Override some sfConfig params

2010-03-17 Thread Marc Weistroff
btw, reading those stuff might help you: http://www.symfony-project.org/more-with-symfony/1_4/en/14-Playing-with-Symfony-Config-Cache http://www.symfony-project.org/book/1_2/19-Mastering-Symfony-s-Configuration-Files#chapter_19_understanding_configuration_handlers (warning, it's the 1.2 book)

Re: [symfony-users] Override some sfConfig params

2010-03-17 Thread Daniel Lohse
Take a look at the csSettingsPlugin: http://www.symfony-project.org/plugins/csSettingsPlugin Regards, Daniel On 17.03.2010, at 09:58, Romain Pouclet wrote: Hi all, I'd like the webmaster of my application to be able to set the value of some config parameters, typically

[symfony-users] foreign key relations in admin generator

2010-03-17 Thread Mihai Rusoaie
Hello, all! Can you give me a hint on how can I display a name from a foreign table in the list display view in a generated backend. To be more precise, here is the schema: client: id: ~ name: { type: varchar(255), required: true, index: unique }

Re: [symfony-users] foreign key relations in admin generator

2010-03-17 Thread Arnold Ispan
Hello, In the client_name partial you could use: *echo $contract-getClient()-getName();* and in the generator.yml you could use: *display: [_client_name, .]* * * *or the second method would be to define a method in your Contract model class* * * *public function getClientName()* *{* *

[symfony-users] Routing cache and memory usage

2010-03-17 Thread Bruno Reis
Hi all, we´ve experienced a hard time here using the routing cache because we have a lot of sluggified items. The httpd child processes were consuming almost 100m of memory. We found that it was due to a 20m routing cache file. Is there a way to keep using the routing cache, but to exclude some

[symfony-users] Sf 1.4 + Propel + Sqlite : unproper handling of bool criteria

2010-03-17 Thread SlimShaggy
Hello all, I am currently migrating an app from Symphony 1.2 to 1.4 I am using an sqlite db and I encountered a problem with the generated queries regarding booleans. Here is a part of my source code: $c = new Criteria(); $c-add(ShowPeer::IS_PUBLISHED,true); $c-add(ShowPeer::IS_CANCELED,false);

Re: [symfony-users] Sf 1.4 + Propel + Sqlite : unproper handling of bool criteria

2010-03-17 Thread Eno
On Wed, 17 Mar 2010, SlimShaggy wrote: I tryed to mess around, changing my criteria to $c-add(ShowPeer::IS_PUBLISHED,'1'); $c-add(ShowPeer::IS_CANCELED,'0'); But even after cleaning the cache it's still generating the same query. Any clue, someone ? This is driving me nuts Which that

Re: [symfony-users] Routing cache and memory usage

2010-03-17 Thread Eno
On Wed, 17 Mar 2010, Bruno Reis wrote: Is there a way to keep using the routing cache, but to exclude some routes from the cache? Or maybe a way to not cache the slug (parameter) part of the route? We're caching routes in memcache :-) -- -- If you want to report a vulnerability issue

[symfony-users] Accessing relations after form-save()

2010-03-17 Thread Andreas Stephan
Hi, I am saving a form with embeddedForms (m:n) and Doctrine. After calling $obj = $form-save() all entries are created correctly in the database. I now want to update the base object with some calculations based on the objects in the relation. To access them I call $obj-getRelatinsFunc() which

Re: [symfony-users] Accessing relations after form-save()

2010-03-17 Thread Lea Hänsenberger
Hi, did you try to $obj-refresh() and/or $obj-refreshRelated() before accessing any relations? Don't know, if it helps, but it's possible :-). Cheers, Lea On Mar 17, 2010, at 15:51 , Andreas Stephan wrote: Hi, I am saving a form with embeddedForms (m:n) and Doctrine. After calling $obj =

[symfony-users] Re: Accessing relations after form-save()

2010-03-17 Thread Andreas Stephan
Great, that solved it. Thank you! On 17 Mrz., 16:03, Lea Hänsenberger baerne...@gmail.com wrote: Hi, did you try to $obj-refresh() and/or $obj-refreshRelated() before accessing any relations? Don't know, if it helps, but it's possible :-). Cheers, Lea On Mar 17, 2010, at 15:51 ,

[symfony-users] Propel: Change generated classname

2010-03-17 Thread Brandon Turner
I'm using Propel in Symfony 1.3.3. If I have a database table named 'myDatabaseTable' and would like the propel generated classname to be MyDatabaseTable, does anyone know how I can do this? Currently, propel generates Mydatabasetable for the classname. I have tried using the phpName table

[symfony-users] [i18n] format_currency and symbol position

2010-03-17 Thread HiDDeN
I'm from Spain, and here prices have the currency symbol AFTER the number, but Symfony insists in placing it before... Is there any way to move it after the number? Thanks! -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You

[symfony-users] Re: Override some sfConfig params

2010-03-17 Thread Richtermeister
I've also been playing with overriding sfConfig settings from an admin panel. Depending on how early you need these settings to apply, this is not really a difficult issue. In my case I listen for the even that tells me that factories are loaded, and inject my custom settings there. You have to

[symfony-users] Month-year date form widget

2010-03-17 Thread Romain Pouclet
Hi All, I'd like to render a custom date widget, I don't need the day, I just want a month and a year, so here is what I do : $this-widgetSchema['date'] = new sfWidgetFormI18nDate(array( 'culture' = 'fr', 'format' = '%month%/%year%' )); I works fine, but to validate it,

[symfony-users] Re: Sf 1.4 + Propel + Sqlite : unproper handling of bool criteria

2010-03-17 Thread SlimShaggy
Which that change, did you try rebuilding models before clearing cache? Changed the query, not the model. I tried to rebuild it, thoug with no success :( -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this

[symfony-users] Re: Routing cache and memory usage

2010-03-17 Thread pghoratiu
Do you use APC opcode caching? If no enable it and also make sure you configure it properly (increase the max php file size limit that is being cached http://www.php.net/manual/en/apc.configuration.php#ini.apc.max-file-size). There is also an interesting article on optimizing PHP code (moving

Re: [symfony-users] Re: Sf 1.4 + Propel + Sqlite : unproper handling of bool criteria

2010-03-17 Thread Eno
On Wed, 17 Mar 2010, SlimShaggy wrote: Changed the query, not the model. I tried to rebuild it, thoug with no success :( I noticed that some symfony plugins had modified their code because of this change in Propel so I imagine it might be similar in your case. -- -- If you want to

[symfony-users] convert to nested set

2010-03-17 Thread Gatos
Hello, If there any code available for converting parent/child table to a nested set table? Thank you in advance -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google

[symfony-users] sfDoctrineTree plugin and symfony 1.0

2010-03-17 Thread Gatos
Hello, I'm using symfony 1.0 and I found sfDoctrineTree plugin release for 1.0 version. But for some a box with Add Child/Remove/Delete doesn't appear. I can't figure out what is wrong, or is not compatible with version 1.0? Thanx -- If you want to report a vulnerability issue on symfony,