Re: [symfony-users] Using UUIDs for primary keys vs AutoIncrementing/Sequence based primary keys

2011-01-03 Thread Svetoslav Shterev
On Sun, 2011-01-02 at 21:12 -0800, Dennis Gearon wrote: > Is it very easy to specify a char column for a primary key in a symfony > table/object? > > Actually, it's probably easy to do, BUT will Symfony choke on acually USING > it? > By symfony, I assume you mean doctrine(symfony is not an orm

Re: [symfony-users] Best practice to allow for Action reuse?

2011-01-03 Thread Svetoslav Shterev
On Sun, 2011-01-02 at 23:47 -0500, Eric B wrote: > > Thanks for the tip. That's kind of what I was looking for. Ideally, > the great thing about Struts2 is that you can also put the action to > take based on the result in a config file, which completely separates > the workflow from the action.

Re: [symfony-users] Best practice to allow for Action reuse?

2011-01-02 Thread Svetoslav Shterev
On Sat, 2011-01-01 at 23:36 -0800, benze wrote: > Hi, > > I'm trying to figure out the best way to reuse an action, and am > having difficulty figuring that out. Specifically because my action > seems to be tied to the response. > > For instance, I have a delete action that I want to call from w

Re: [symfony-users] Doctrine left join without relation

2010-10-01 Thread Svetoslav Shterev
On Fri, 2010-10-01 at 07:12 -0700, Vikos wrote: > Hello > > The question: Can I do join without relation [with doctrine]? This question is probably better suited for the doctrine user group. You cannot make a join without a relation in doctrine. > My project schema is huge. Every record has 'crea

[symfony-users] Re: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens

2010-10-01 Thread Svetoslav Shterev
On Sep 28, 2:26 pm, corneliusparkin wrote: > When selecting one option in the destination select box and submitting > the form to the action, it seems fine, but as soon as I select more > that one, I receive the error: "SQLSTATE[HY093]: Invalid parameter > number: number of bound variables does no

[symfony-users] Re: How to display/get the info-related to the main form on the embedded form?

2010-09-13 Thread Svetoslav Shterev
On Sep 10, 10:51 pm, Alejandro Gómez wrote: > I don't know why but embedRelation('AlumnoInterno') did not work. > Maybe the Propel version? > > Symfony throws me "Call to undefined method > AlumnoForm::embedRelation." Are you using Propel? > In the other hand, I used getAlumnoInternos() wich "

[symfony-users] Re: sfWidgetFormChoice and setDefault

2010-09-13 Thread Svetoslav Shterev
Glancing through the code, the default option(what setDefault() does on a widget) doesn't seem to be used at all in the choice widgets. At any rate, you should be using the form's "default" fields, instead of the widget's. $this->setDefault('priority', max(...)); The widget's default value(if us

[symfony-users] Re: How to validate values from $GLOBALS["HTTP_RAW_POST_DATA"]

2010-08-05 Thread Svetoslav Shterev
A better way would be to read from php://input(not using $GLOBALS). I don't see a reason why you can't do it - but they really should learn how to post multiform, instead of just dumping raw On Aug 4, 2:47 pm, Grzegorz Śliwiński wrote: > Thanks Gareth, > I'll have to play it. > I wanted to v

[symfony-users] Re: Symfony 1.4: Get current route name

2010-07-28 Thread Svetoslav Shterev
getCurrentRouteName() would be the more appropriate method :) On Jul 27, 1:31 pm, Gábor Fási wrote: > sfPatternRouting has a function called getCurrentInternalUri [1], you > should use that. > Also, there is no reason to use sfContext::getInstance() in this case, > you should use $this->getContex

[symfony-users] Re: Symfony 2 - anything like grails?

2010-07-05 Thread Svetoslav Shterev
Symfony doesn't operate with a DBMS directly. Perhaps you mean Doctrine? You can do that("specify certain settings for the database columns individually") easily there, too. On Jul 2, 7:00 am, "Bill P." wrote: > Hello, > > I have been using grails for a recent project as well as learning the > o

[symfony-users] Re: Use database in app.yml

2010-07-05 Thread Svetoslav Shterev
Why not modify app.yml from your code, instead of using a database? On Jul 4, 10:08 pm, HAUSa wrote: > I want to use this because I have some system setting which should > really belong in that app.yml file. But the admins which I am > developing it for want to change those settings in an admin p

[symfony-users] Re: Doctrine Query Left Join

2010-06-25 Thread Svetoslav Shterev
This is simply not how doctrine relations work. Read the doctrine documentation on how to define models and relations, then try again. On Jun 25, 7:22 pm, Tom Ptacnik wrote: > What about > > $this->nodes = Doctrine::getTable('ElementNode') > ->createQuery('n1') > ->select('n1.*, n2.*') > ->leftJo

[symfony-users] Re: Route does not add a parameter when its defined as a default one.

2010-06-24 Thread Svetoslav Shterev
Hello. One -> all route tokens should be unique, you are right on that. Second, the route order matters. The first route that matches will be used. I am guessing /blog/:page is your first route, which is why it matches every case. As for default parameters not appearing - I'm not sure. Can you s

[symfony-users] Re: Day 1 - jobeet problem

2010-06-24 Thread Svetoslav Shterev
You have most likely not edited the path to the project configuration in your front controllers(index/frontend_dev.php) On Jun 22, 7:30 pm, Christian wrote: > Hi! > > my name is christian and i'm new with symfony framework. > > I found this step by step > tutorial:http://www.symfony-project.org/

[symfony-users] Re: How to pass PHP values to addJavascript() (or something else) ?

2010-06-24 Thread Svetoslav Shterev
That would be one way. On Jun 24, 9:05 am, Tom Ptacnik wrote: > So if I need to get some variables in javascript from the app, you > advice is to generate it into the DOM? > > Example: I need to detect which culture is set. Then i should generate > en into the DOM and then > in the javascript rea

[symfony-users] Re: unwanted id column from doctrine:build-sql / build-sql ignores schema.yml

2010-06-19 Thread Svetoslav Shterev
build-sql does not touch the schema at all. It generates sql from the *models*. You need to generate new models from the schema(build-model) first, and then regenerate sql. On Jun 19, 2:33 pm, Ryan Walker wrote: > I hope this isn't a double post. I tried to post this yesterday and it did > not s

[symfony-users] Re: can someone take a look--sfWidgetFormDoctrineChoice problem

2010-06-17 Thread Svetoslav Shterev
You'll need to pass 'key_method' if you want to change which key it should be saving(Although, doctrine is set up to take the primary key, which is what you should be using it for, really) The display depends on either the 'method' option(which method to use for display), by default __toString().

[symfony-users] Re: methods wiped out by svn export - using externals

2010-06-17 Thread Svetoslav Shterev
Yup, symfony plugins are designed to be easily extensible - look up the documentation with them(ie in jobeet) for examples how to extend the plugin's architecture. On Jun 17, 2:03 pm, Tofuwarrior wrote: > OK. > > I figured this was what was going on. > > I'll look into the copying across suggesti

[symfony-users] Re: Loading fixtures data error

2010-06-15 Thread Svetoslav Shterev
Have you tried not specifying item_id at all? On Jun 14, 4:10 pm, dex wrote: > Hello, I bumped into an error today when I was trying to load some > fixtures data. > I kind of know what the problem is, but I don't know the solution, and > google doesn't says anything useful. > > Here are the data

[symfony-users] Re: Failed to save form with multiple checkboxes

2010-06-15 Thread Svetoslav Shterev
Show your form and the action that is saving the result, and when you're getting the error(ie, when you call bind, or when you call save) A stack trace of the error would be best, really, but without any of this information it's just guesswork what the cause could be. On Jun 15, 12:10 pm, eantz

[symfony-users] Re: app.yml array is not array on first level

2010-06-14 Thread Svetoslav Shterev
http://www.symfony-project.org/book/1_2/05-Configuring-Symfony#chapter_05_sub_custom_application_settings_and_app_yml It's documented there -> "When you should require an PHP array directly beneath the all key you need to use a category header, otherwise symfony will make the values separately avai

[symfony-users] Re: sfWidgetFormInputHidden is not visible

2010-06-11 Thread Svetoslav Shterev
Even better coding would be to not include the user_id as a hidden input at all, since it can be manipulated by the user(of course, unless you intend it to be changeable) - you can simply fetch the user id in the action accepting the form. On Jun 11, 4:10 pm, "Christopher Schnell" wrote: > Hi, >