[symfony-users] PR7 Strange ORM behavior

2011-03-18 Thread Lideln
Hi ! I am trying the database functionalities in PR7. I am experiencing a strange ORM behavior. Here is my code : [code] $qb = $this->get('doctrine.orm.entity_manager')->createQueryBuilder(); $aGalleries = $qb->select('g')->from('SWMainBundle:Gallery', 'g')- >where($qb->expr()->eq('g.active', 1))

[symfony-users] Re: PR7 Accessing config.yml "parameters" variables

2011-03-18 Thread Lideln
On 17 mar, 22:49, Christophe COEVOET wrote: > Le 17/03/2011 18:01, Lideln a crit :> Hi, > > > I'm trying to use Twig, and I would like to do a simple thing : > > Display the parameters.title value defined in my config.yml file. > > > I found how to display ht

[symfony-users] Re: Symfony 2 Doctrine Database Schema imports

2011-03-18 Thread Lideln
Hi, First of all you need to configure your app properly (config.yml), for example : doctrine: dbal: driver: %database_driver% host: %database_host% dbname: %database_name% user: %database_user% passwor

[symfony-users] PR7 Accessing config.yml "parameters" variables

2011-03-17 Thread Lideln
Hi, I'm trying to use Twig, and I would like to do a simple thing : Display the parameters.title value defined in my config.yml file. I found how to display http query parameters, but not config params (the class GlobalVariables does not contain a "getParameters" function). Should I add a "getCon

[symfony-users] Re: Fatal errors (new xsd and class not found)

2011-03-15 Thread Lideln
ish? > > > > On Mon, Mar 14, 2011 at 03:58, Lideln wrote: > > Nobody ? The only other case I found on google was spanish and I > > didn't understand a word of it :) > > > Don't tell me I'm the only one to have the PR7 not working once > > do

[symfony-users] Re: Fatal errors (new xsd and class not found)

2011-03-14 Thread Lideln
ing. Thanks in advance, On 11 mar, 05:30, Lideln wrote: > Hi, > > I downloaded the PR7, and got a few fatal errors. > > On my project first, I updated the files from PR6 and I "think" I did > not forget anything, but I get that error : > Fatal error: Uncaught excep

[symfony-users] [PR7] Fatal errors (new xsd and class not found)

2011-03-11 Thread Lideln
Hi, I downloaded the PR7, and got a few fatal errors. On my project first, I updated the files from PR6 and I "think" I did not forget anything, but I get that error : Fatal error: Uncaught exception 'InvalidArgumentException' with message '[ERROR 1845] Element '{http://symfony.com/schema/dic/ser

[symfony-users] Re: Generating repositories

2011-03-05 Thread Lideln
Hi there ! Ok I succeeded in creating a Repository using your help, and using the "annotation" type, and modifying the Entities by hand to prepend with "orm:". But it is not convenient, and moreover the generated entities are not complete and are overwrited each time (and not merged, so I lose my

[symfony-users] Re: EntityChoiceField : two issues

2011-02-24 Thread Lideln
Hi Christophe, On 23 fév, 18:22, stof wrote: > On Wed, 23 Feb 2011 09:08:33 -0800 (PST), Lideln wrote: > > Hi Carlos, > > > Thank you for the answer ! > > This is a good idea to use options to pass the EM, I will follow your > > advice ! > > Using an option i

[symfony-users] Re: Generating repositories

2011-02-24 Thread Lideln
Up ! This is quite blocking for me not to have the repositories. Can please someone point me to the right direction ? I really tried many and many configurations... Maybe I just missed the one that works. Thanks a lot, On 18 fév, 00:01, Lideln wrote: > Hi, > > I am trying to gen

[symfony-users] Re: EntityChoiceField : two issues

2011-02-23 Thread Lideln
onstructor (not > proved) > >                 $em = $this->getOption('em'); >                 //... >         } > > } > > Hope it helps!! > > On Feb 20, 10:16 pm, Lideln wrote: > > > > > > > > > Hi, > > > I'm us

[symfony-users] [Symfony2] EntityChoiceField : two issues

2011-02-20 Thread Lideln
Hi, I'm using the EntityChoiceField, and I encountered two issues : 1) when modifying the querybuilder, the value in the html option tag is not the one corresponding to the label of the option tag 2) I only get one single option tag in my select, whereas I have multiple rows in my db table, even w

[symfony-users] Re: DateField type error

2011-02-20 Thread Lideln
I digged a bit and got those results : When using type = raw, and providing an associative array, it works ! (but not for validation) When using type = string, I have to modify PropertyPath.php in function readPropertyPath() : else { if (is_string($objectOrArray))

[symfony-users] Re: [Symfony2] DateField type error

2011-02-19 Thread Lideln
Hi Bernhard, Ok I'll try that, but in that case that does not explain why it complains when I use the type=string parameter ? Is there a fully functionnal example of the DateField and Date() validator thing ? On 18 fév, 14:22, Bernhard Schussek wrote: > Hi Lideln, > > The @D

[symfony-users] [Symfony2] Generating repositories

2011-02-18 Thread Lideln
Hi, I am trying to generate the repositories : php app/console doctrine:generate:repositories MainBundle But what I get is : > SKIP no custom repository for Ratethestar\MainBundle\Entity\Entry > SKIP no custom repository for Ratethestar\MainBundle\Entity\Member > SKIP no custom repository f

[symfony-users] [Symfony2] DateField type error

2011-02-18 Thread Lideln
Hi there, I added a DateField to my form. $this->add(new DateField('dateBirth', array('years' => range(date('Y') - 100, date('Y') - 17; 1) If I do not specify the type (which is DateTime by default), I get this error when submitting : Expected argument of type string, object given (DateValida

[symfony-users] Re: symfony2 - access everything from Entity class

2011-02-18 Thread Lideln
Thank you Christophe, I tried to generate the repositories before but it complained about "nothing to do", therefore I worked on something else. I will try what you told me tonight. Thank you ! On 17 fév, 15:22, Christophe COEVOET wrote: > Le 16/02/2011 23:00, Lideln a crit :>

[symfony-users] symfony2 - access everything from Entity class

2011-02-17 Thread Lideln
Hi ! I am experimenting the PR6, but I could not find how to access things from Entity just as you would do from Controller ($this- >get('database_connection') or $this- >get('doctrine.orm.entity_manager') and so on). It would be nice to place all "static" database queries inside the Entities. A

[symfony-users] Re: Forms and validation

2011-02-17 Thread Lideln
Hi ! I fixed the issue by removing my lame ctor and passing the name parameter to the create() factory instead as advised. Thank you all ! On 16 fév, 10:51, Bernhard Schussek wrote: > Oops, parentheses I mean. > > /** @validation:NotNull */ > and > /** @validation:NotNull() */ > > both are val

[symfony-users] Re: Forms and validation

2011-02-16 Thread Lideln
Hi, I did not understand the "parent" thing ? Is there something wrong with my code ? I hope so, otherwise I would not understand why I got this error :-/ On 16 fév, 00:27, Bernhard Schussek wrote: > > Correct syntax for annotation-validators is to use parents in the end: > > email(), NotBlank()

[symfony-users] Re: Forms and validation

2011-02-16 Thread Lideln
On 16 fév, 00:27, Bernhard Schussek wrote: > > Correct syntax for annotation-validators is to use parents in the end: > > email(), NotBlank()... > > This is not true. You can leave away the parents just as well. > > Bernhard Sorry what do you guys mean by parents ? Is there something wrong with

[symfony-users] Re: Form validation

2011-02-16 Thread Lideln
On 16 fév, 00:02, Christophe COEVOET wrote: > Le 15/02/2011 23:57, Lideln a crit : > > > Since I cannot add new answers to the topic I created earlier (why > > that ?), I create a new one here with additionnal info. > > > As I said, I followed the official tutori

[symfony-users] Form validation

2011-02-15 Thread Lideln
Since I cannot add new answers to the topic I created earlier (why that ?), I create a new one here with additionnal info. As I said, I followed the official tutorial to create a RegisterForm and using it to register new members. But I got stuck at the validation, because I got the error : The opt

[symfony-users] Re: Forms and validation

2011-02-15 Thread Lideln
Hi Nikita, Thanks for the answer. I had already discovered the form name parameter. Only I fixed it by creating a ctor in my form and calling parent::__construct('register'). The topic you kindly gave me did not help. I still have the " The option "validator" is required for validating " error. J

[symfony-users] Re: Forms and validation

2011-02-15 Thread Lideln
veral questions regarding sf2 but form validation will be enough for now ^^) Kind regards, Lideln On 15 fév, 17:23, Nikita Korotaev wrote: > There is no such thing like EmailField at the moment, I don't know why it's > in docs. You should use textField and set Email validator inst

[symfony-users] [SF2] Forms and validation

2011-02-15 Thread Lideln
nfig.yml Thank you all (if you have a link to more up to date tutorials, I would love to have it, thank you :) ) Lideln -- 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] Re: [SF2] Tiny thoughts

2010-12-03 Thread Lideln
#x27;m glad I can thank you in person for all the amazing work you did with Symfony (among other things). Thank you ! It's true that my small feedback was a point of detail compared to the complexity of the framework. Thanks from Paris, Renaud On 1 déc, 07:52, Fabien Potencier wrote:

[symfony-users] Re: [SF2] Tiny thoughts

2010-12-03 Thread Lideln
t; behaviors with your own classes extending the Symfony2 classes and do it > like you want. > Although don't worry, really the default way is better than oneself think in > the beginning! > > Pablo > > On Mon, Nov 29, 2010 at 7:22 PM, Lideln wrote: > > Hi there, > >

[symfony-users] [SF2] Tiny thoughts

2010-11-30 Thread Lideln
Hi there, I just read the entire Symfony 2 quick tour. I found many useful and smart things, which are great ! But I also wondered about a few (tiny) things, that are more about ease of use. Hope I get an answer here :) 1) I'm sorry that we lost the ability to "return nothing" in the action (whic