[symfony-users] Symfony2 PR3 and keeping up with the Symfony2 sandbox changes

2010-08-10 Thread djones
Hi all, I'm trying to keep up with changes to Symfony2 so that I don't learn things that are outdated. I've been working with the current github sandbox and that's all working fine, but I believe that for some features (validation w/ annotations,etc.) I need to checkout the PR3 branch. When I do t

[symfony-users] Re: Symfony2 validation in the sandbox

2010-07-01 Thread djones
Thanks Bernhard, I've now got the validator and I can get validation to work using YAML configuration (I haven't tried XML or PHP). I still can't use annotations for validation though. I'm getting the same exception as before 'The tag "web:validation" is not defined in the "web" extension' when I u

[symfony-users] Symfony2 validation in the sandbox

2010-06-30 Thread djones
I have an up-to-date copy of the Symfony2 sandbox and I'm working through the various guides, but I'm having trouble with the Validation guide. I get an exception 'The service "validator" does not exist.', using $validator = $this->container->getValidatorService(); or $validator = $this->container

[symfony-users] Re: Sorting in one to many relationships

2010-06-13 Thread djones
You can set the sort order for related comments in the hasMany() in setUp(): $this->hasMany('ArticleComment as Comments', array( 'local' => 'id', 'foreign' => 'article_id', 'orderBy' => 'somecolumn ASC')); On Jun 13, 6:32 am, Ozzy wrote: > Hi, > > I have a

[symfony-users] Re: Doctrine Migration - Create enum type column

2010-01-18 Thread djones
If you are using symfony 1.3/1.4 you can add it to your schema.yml and use the doctrine:generate-migrations-diff task. config/doctrine/schema.yml [code] columns: ... my_column: type: enum values: [SomeValue, SomeOtherValue] default: SomeValue ... [/code] If you are using M

[symfony-users] Re: Help with should be simple stuff...

2010-01-12 Thread djones
If you are using doctrine then you need to do it like this: $this->_set('password', sha1($password); And yes, you can define a column as unique in your schema.yml file: "unique: true" (this will automatically add the unique index). On Jan 11, 7:24 pm, Darren884 wrote: > Hello, I am having troub

[symfony-users] Re: Doctrine 2 joins on same table

2009-12-18 Thread djones
It might be a case-sensitivity issue - you have lowercase ("venue", "home" and "away") in your relations section of your schema, but the first letter capitalised ("Venue", "Home", "Away") in your fixtures. On Dec 17, 12:05 pm, mattvick wrote: > Symfony 1.4 > PHP 5.2.9 > MySQL 5.0.81 > > I'm havin

[symfony-users] Re: symfony mailer question

2009-11-26 Thread djones
It's shown in the swift documentation: http://swiftmailer.org/docs/recipients Use an array with the e-mail as the key and the name as the value: array('some...@test.com' => 'Some One') On Nov 26, 9:01 pm, Paul Witschger wrote: > I'm new to symfony, so I apologize now if this has already been >

[symfony-users] Re: symfony 1.3 && php 5.3 && plugins installation

2009-09-16 Thread djones
I've also experienced a lot of deprecated warnings when installing plugins, but despite the complaints they seem to have installed successfully. However, I'm using symfony 1.2 with php 5.3.0 rather than symfony 1.3. On Sep 16, 10:55 am, alessandro cinelli wrote: > Hi folks, > > I posted in the d

[symfony-users] Re: Upload image with admin generator

2009-08-04 Thread djones
The Jobeet tutorial has image uploading. Look at the Admin Generator chapter for more information: http://www.symfony-project.org/jobeet/1_2/Doctrine/en/12 On Aug 3, 6:29 pm, bogo wrote: > Hi, > thanks for the hint, but I need upload input in the same form. I dug a > lot and didn't find solution

[symfony-users] Re: Slugify?

2009-07-21 Thread djones
It originated in the publishing world: http://en.wikipedia.org/wiki/Slug_(typesetting) A slug is a piece of spacing material used in typesetting to space paragraphs. They are usually manufactured in strips of 6pt lead. ... More recently this term is also used in web publishing to refer to short

[symfony-users] Re: How to set enum values?

2009-05-16 Thread djones
It's not neccessary to emulate ENUMs yourself, Doctrine will do that for you, or will use native ENUMs if you choose to and your RDBMS supports them. >From the "symfony and Doctrine with sfDoctrinePlugin" book: "The Doctrine enum type can either be emulated or you can use the native enum type if

[symfony-users] Re: Fixtures - can I specify a literal value on a linked table?

2009-03-26 Thread djones
On Mar 25, 7:03 pm, Steve the Canuck wrote: > The reason I ran into this is because I have multiple fixture files. > I have some tables that are purely reference tables.  So, I don't use > autonumbering for those fields.  Also, these tables exist in a > different fixture file. > > I wanted to cre