[symfony-users] Translating the backend

2010-08-21 Thread cosmy
Hi all, here I am again.
What I have to modify to translate automatically the function buttons
of the backend (if it's possibile..)?
It's quite strange but I can't find anything about it (I don't need
the Il18 and multilanguage support... I only want my backend in
italian without correcting thousands of files) :)

Thank you in advance,
Cosimo

-- 
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Unhappy: sending mails with layout

2010-08-21 Thread Alexandre Salomé
 I don't find easy way to do that. Looks like rendering of a template 
is complicated when you want to specify a module.


For example, this should work :

   public function executeSend()
   {
  $body-setTemplate('sendSuccess); // .php ?
  $body = $this-getView()-render();
   }

But rendering on a different module is complicated.

And using filenames for specifying partial/page is not a good idea.

You should really consider converting your layout to partial, you are 
using big machine for a minor issue.


getView on sfController : 
http://www.symfony-project.org/api/1_3/sfController#method_getview
view on sfPHPView : 
http://www.symfony-project.org/api/1_4/sfPHPView#method_render


Alexandre

Le 19/08/10 23:18, Antoine S. a écrit :

Hi,

I quiet like to use the dispatcher to send email.
The listener will build the email.

For the layout, I only use partial -renderPartial(), that can act as a
layout because you can
include other partial/component in a partial.

Maybe with sfView or sfPHPView there is a way to render a complete
layout..
I am quiet interested too if there is an easy solution.

If not, partial and component are good.

On Aug 19, 1:22 am, Georggeor...@have2.com  wrote:

Hello,

I am confused. I would like to send emails with layout and template from
any place in my project, application or a task.
Reading the docs
(http://www.symfony-project.org/more-with-symfony/1_4/en/04-Emails), it
tells me to put each email in a class, and Of course, adding a base
class to centralize the shared headers like the From header, or to add a
common signature can be convenient.

Here comes the part why I am unhappy and confused, I have a cool MVC
framework, and for emails I should go back to home-brew PHP and mix view
and controller?

Wouldn't it be cleaner to put the email views in a plugin, and make them
accessible from everywhere?

I would have expected a plugin that makes this possible, but no.

How are you doing it, where do you put the presentation layers of your
emails?

Georg


--
Alexandre Salomé - http://alexandre.salome.fr

--
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] organizing partials in folders

2010-08-21 Thread Alexandre Salomé

 He is looking for a module folder. Try setting explicitly your module :

include_partial('my_module/folder/headline_news');

But (maybe) you will have to put _ on folders :

/modules/my_module/templates/_folder/headline_new

Alex'


Le 19/08/10 22:24, Joshua a écrit :

include_partial(headline_news);

How can I do this with partial _headline_news.php inside a folder
within templates? If I try something like
project_root/apps/frontend/modules/some_module/templates/folder/
_headline_news.php

Then in the template index
include_partial(folder/headline_news);

The template _headline_news.php does not exist or is unreadable in
.

Am I using the wrong approach? I have symfony managing two separate
site templates that will each have separate partials. But the same
actions are used for each template. I need a way to organize all the
files in the module /template folder.



--
Alexandre Salomé - http://alexandre.salome.fr

--
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Setting up SF under IIS

2010-08-21 Thread Alexandre Salomé

 Hello,

Seems like you have 2 problems :

1./ Your template code

The error message refer to the method named :
sfOutputEscaperArrayDecorator::getQuestionaire

The class sfOutputEscaperArrayDecorator is used to decorate arrays in 
template rendering.


Debug your template code


2./ Your Windows installation

Looks like everything is pretty ready to be launched.

It must be about rewriting :

When frontend_dev.php is in the URL, it is OK. But URLs are not 
rewritten properly to your index.php controller.


Look at IIS rewriting configuration (don't know a lot about IIS).

Alexandre


Le 19/08/10 21:04, Petronel a écrit :

Hi everyone !

I am new and I've tried to learn from jobeet and askeet tutorials.
I've managed to create a app and finally I've tried to place it online
for my boss.
Problem is that the production server is a windows 2003 with IIS.

I've checkout there symfony version 1.4.0 (C:\symfony\lib)
and setup a new site under IIS console at c:\inetpub\mysite\web, and
added as virtual folder the C:\symfony\data\web\sf

Than I've added to c:\inetpub\mysite\cache the IUSR user and added
full read write execute rights - just to be sure,

  than for c:\symfony added authenticated users read execute and
replaced on all childs

I receive when accessing the

http://MYSITE/frontend_dev.php/machine
Fatal error: Call to undefined method
sfOutputEscaperArrayDecorator::getQuestionaire() in ...
(I see no SF debug bar)

and when
http://MYSITE/machine

THE PAGE CANNOT BE FOUND

I've thought the philosophy of Symfony is the flexibility from DB to
code and from APACHE to IIS and MySQL to MSSQL.

Can anyone send me a helping hand please ?

With kind regards

Petronel



--
Alexandre Salomé - http://alexandre.salome.fr

--
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] sf_guard_group/sf_guard_user

2010-08-21 Thread vero
I decided to use sfGuardPlugin so I put in y schema.yml:
propel:
  _attributes:
package: lib.model
defaultIdMethod: native
  pfc_grupo:
id: ~
GRUPO_ID: { type: integer, foreignTable:sf_guard_group,
foreignReference: id, required: true, onDelete: cascade }
LINEAS_INVES: { type: CLOB}
created_at: ~
  pfc_usuario:
id: ~
USER_ID: { type: integer, foreignTable:sf_guard_user,
foreignReference: id, required: true, onDelete: cascade }
NOMBRE: { type: VARCHAR, size: '255', required: true }
APELLIDOS: { type: VARCHAR, size: '255' }
EMAIL: { type: VARCHAR, size: '255' }
HOMEPAGE: { type: VARCHAR, size: '255'}
TELEFONO: { type: INTEGER }
SCR_IMG: { type: VARCHAR, size: '255' }
trabaja_en: { type: INTEGER, required: true, foreignTable:
pfc_proyecto, foreignReference: id, onDelete: cascade }
created_at: ~
...

but now I don't know how,for example, access to name and description
in grupo/indexSuccess.php.
I try:

h2 ?php echo $grupo-getGrupoId()-getName() ? /h2

but Symfony response me with an error window:

Oops! An Error Occurred
The server returned a 500 Internal Server Error.

-- 
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Strange behaviour on the production server

2010-08-21 Thread Petronel
I have something like this http://pastebin.com/ZzUCkBpH

If I use in the indexSuccess.php $relation-getId() I get when
http://site.com:82/machine   THE PAGE CANNOT BE FOUND in index.php and
in
frontend_dev.php I get

Notice: Trying to get property of non-object in C:\symfony\lib\escaper
\sfOutputEscaper.class.php on line 241


if I use $relation-id the paginator creates the correct number of
pages but where a value should appear in HTML, nothing is displayed...

Do you have any ideea ?

With kind regards

Petronel

-- 
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: correlated subquery in orderbY()

2010-08-21 Thread Jochen Daum
Hi,

figured it out myself.

Couple of lines before my -orderBy(), there is a line creating the query:

$query = Doctrine::getTable('Supplier')
   -createQuery('a');

 $query-orderBy((SELECT AVG( supplier_rating_id ) FROM rating WHERE
 rating.supplier_id = supplier.id) DESC);


The table alias in the orderBy needs to match the alias specified in
createQuery('a') (alias is 'a'):

$query-orderBy((SELECT AVG( supplier_rating_id ) FROM rating WHERE
rating.supplier_id = a.id) DESC);

At least that is what works, I guessed the answer.

Thanks again for reading.

Jochen

-- 
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: sfDependentSelectPlugin problem

2010-08-21 Thread chok
Ok,

I think it's because you have remove the default routing rule :

default:
  url:   /:module/:action/*

because I have installed the plugin and have the same error and the
line was :

 $this-addOption('url', sfContext::getInstance()-getController()-
genUrl('sfDependentSelectAuto/_ajax'));

So just add a new routing rule like :

sfDependentSelectAuto_ajax:
  url: /depepedent/ajax
  param: { module: sfDependentSelectAuto, action: _ajax }


It's the same problem for you ?

On 20 août, 15:06, wueb webmaster@gmail.com wrote:
 Yes i did chock

 On 20 Ago, 12:07, chok chok...@gmail.com wrote:

  Hello,

  Do you have activate the module ?

  all:
    .settings:
      ...
      enabled_modules:        [sfDependentSelectAuto]

  On page :http://www.symfony-project.org/plugins/sfDependentSelectPlugin

  On 20 août, 12:18, wueb webmaster@gmail.com wrote:

   Hello, i'm using the sfDependentSelectPlugin but i'm facing a problem.

   If i create the widgets like they show on their ReadMe:

    $this-widgetSchema['pais_id'] = new
   sfWidgetFormDoctrineChoice(array(
               'model'     = 'Pais',
               'add_empty' = 'Seleccione país',
           ));

           $this-widgetSchema['provincia_id'] = new
   sfWidgetFormDoctrineDependentSelect(array(
               'model'     = 'Provincia',
               'depends'   = 'Pais',
               'add_empty' = 'Seleccione provincia',
           ));

   When i run the form i have an error:

   Unable to find a matching route to generate url for params array
   ( 'action' = '_ajax', 'module' = 'sfDependentSelectAuto',).

   How can i solve this? Anyone knows?



-- 
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Database does not exist

2010-08-21 Thread Paolo90
Thanks for your reply, but it seems it doesn't work anyway! :(

On 20 Ago, 17:42, Quince quince.gib...@gmail.com wrote:
 I'm a new user so hopefully this solves your problem.  In your
 schema.yml file I believe you're missing the following line for each
 table:
 connection: propel

 This should be a level below the table name.  For instance:
 ---code-
 blog:
   connection: propel
 ---/code-

 HTH.

 On Aug 20, 10:29 am, Paolo90 paolomari...@gmail.com wrote:



  Hi to everyone,
  I'm a new Symfony's user, right now I'm trying to create my first
  application but it seems I have a problem, when i execute the command
  Propel:insert-sql i get the following error: Database blog does
  not exist.
  What makes me crazy is that i configured the database connection
  several times and i also checked it more than once and it is correct
  and of course the blog database exist on my MySql serverI dont
  have any idea on how i get rid of this error..
  I'm using symfony 1.4.

  Here there post the database.yml file:
   dev:
    propel:
      param:
        classname: DebugPDO
        debug: { realmemoryusage: true, details: { time: { enabled:
  true }, slow: { enabled: true, threshold: 0.1 }, mem: { enabled:
  true }, mempeak: { enabled: true }, memdelta: { enabled: true } } }
  test:
    propel:
      param:
        classname: DebugPDO
  all:
    propel:
      class: sfPropelDatabase
      param:
        classname: PropelPDO
        dsn: 'mysql:host=localhost;dbname=blog'
        username: root
        password: null
        encoding: utf8
        persistent: true
        pooling: true

  the schema.yml:

  blog:
    _attributes:
      defaultIdMethod: native
    post:
      _attributes: { phpName: Post }
      id: { type: integer, required: true, primaryKey: true,
  autoIncrement: true }
      create_at: { type: timestamp, required: true }
      updated_at: { type: timestamp, required: false }
      title: { type: varchar, size: '100', required: true }
      body: { type: longvarchar, required: true }
    category:
      _attributes: { phpName: Category }
      id: { type: integer, required: true, primaryKey: true,
  autoIncrement: true }
      created_at: { type: timestamp, required: true }
      updated_at: { type: timestamp, required: false }
      name: { type: varchar, size: '50', required: true }
    partof:
      _attributes: { phpName: partOf }
      post_id: { type: integer, required: true, primaryKey: true,
  foreignTable: post, foreignReference: id }
      cat_id: { type: integer, required: true, primaryKey: true,
  foreignTable: category, foreignReference: id }

  can anyone help me with this?!
  Thank you!

-- 
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Abridged summary of symfony-users@googlegroups.com - 32 Messages in 22 Topics

2010-08-21 Thread joost . farla
Beste,

Donderdag 19 tot en met maandag 23 augustus ben ik niet aanwezig op kantoor.
U kunt voor dringende zaken contact opnemen met mijn collega Dimitri van Hees: 
dimi...@freshheads.com of 013 5448761.

Met vriendelijke groet,

Joost Farla
joost.fa...@freshheads.com

- -

freshheads grafisch ontwerp en internet applicaties
Dunantstraat 1c | 5017 KC Tilburg | Nederland
tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
i...@freshheads.com | www.freshheads.com


-- 
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Translating the backend

2010-08-21 Thread Massimiliano Arione
On 21 Ago, 11:01, cosmy c.zec...@gmail.com wrote:
 What I have to modify to translate automatically the function buttons
 of the backend (if it's possibile..)?
 It's quite strange but I can't find anything about it (I don't need
 the Il18 and multilanguage support... I only want my backend in
 italian without correcting thousands of files) :)

Cosimo,
you can get help on Italian group http://groups.google.com/group/symfony-it
Anyway: if you want your backend translated, you need to activate i18n
and set it as default_culture.

cheers
Massimiliano

-- 
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Database does not exist

2010-08-21 Thread chok
And in your propel.ini ?

On 21 août, 13:23, Paolo90 paolomari...@gmail.com wrote:
 Thanks for your reply, but it seems it doesn't work anyway! :(

 On 20 Ago, 17:42, Quince quince.gib...@gmail.com wrote:

  I'm a new user so hopefully this solves your problem.  In your
  schema.yml file I believe you're missing the following line for each
  table:
  connection: propel

  This should be a level below the table name.  For instance:
  ---code-
  blog:
    connection: propel
  ---/code-

  HTH.

  On Aug 20, 10:29 am, Paolo90 paolomari...@gmail.com wrote:

   Hi to everyone,
   I'm a new Symfony's user, right now I'm trying to create my first
   application but it seems I have a problem, when i execute the command
   Propel:insert-sql i get the following error: Database blog does
   not exist.
   What makes me crazy is that i configured the database connection
   several times and i also checked it more than once and it is correct
   and of course the blog database exist on my MySql serverI dont
   have any idea on how i get rid of this error..
   I'm using symfony 1.4.

   Here there post the database.yml file:
dev:
     propel:
       param:
         classname: DebugPDO
         debug: { realmemoryusage: true, details: { time: { enabled:
   true }, slow: { enabled: true, threshold: 0.1 }, mem: { enabled:
   true }, mempeak: { enabled: true }, memdelta: { enabled: true } } }
   test:
     propel:
       param:
         classname: DebugPDO
   all:
     propel:
       class: sfPropelDatabase
       param:
         classname: PropelPDO
         dsn: 'mysql:host=localhost;dbname=blog'
         username: root
         password: null
         encoding: utf8
         persistent: true
         pooling: true

   the schema.yml:

   blog:
     _attributes:
       defaultIdMethod: native
     post:
       _attributes: { phpName: Post }
       id: { type: integer, required: true, primaryKey: true,
   autoIncrement: true }
       create_at: { type: timestamp, required: true }
       updated_at: { type: timestamp, required: false }
       title: { type: varchar, size: '100', required: true }
       body: { type: longvarchar, required: true }
     category:
       _attributes: { phpName: Category }
       id: { type: integer, required: true, primaryKey: true,
   autoIncrement: true }
       created_at: { type: timestamp, required: true }
       updated_at: { type: timestamp, required: false }
       name: { type: varchar, size: '50', required: true }
     partof:
       _attributes: { phpName: partOf }
       post_id: { type: integer, required: true, primaryKey: true,
   foreignTable: post, foreignReference: id }
       cat_id: { type: integer, required: true, primaryKey: true,
   foreignTable: category, foreignReference: id }

   can anyone help me with this?!
   Thank you!



-- 
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] setNameFormat() strange bahavoir and online documentation errors

2010-08-21 Thread Ettore
Hello,
first of all i'm using last SVN version of Symfony 1.4 .

I built a simple form extending sfFormSymfony and i'm experiencing an
unusual (or at least not documented) behavoir using sfWidgetFormSchema-
setNameFormat() .
In the action/rendering i don't do anything expect creating the form
( new ProductSelectForm() ) and render it ( echo $form ) .
Here's the form code:

--- ProductSelectForm.class.php --
class ProductSelectForm extends sfFormSymfony
{
public function configure()
{
parent::configure();
  $this-widgetSchema-setNameFormat( 'test[%s]' );

  // Build array with all products
  $products = array( 'a', 'b' 'doesnt matter' );

  $this-setWidget('product', new
sfWidgetFormChoice( array( 'choices' = $products ) ) );

  $this-setValidator( 'product', new sfValidatorPass() );
}
}
- EOF 

With the code above everything works fine and i get the rights names:
select id=test_product name=test[product]
input type=hidden id=test__csrf_token
value=bf84cffccc763f408c57dcc53f2c450f name=test[_csrf_token]

Now if i use setWidgets instead of setWidget

 $this-setWidgets( array(
  'product' = new sfWidgetFormChoice( array( 'choices' =
$products ) )
  ));

i get:

select id=test_product name=product
input type=hidden id=test__csrf_token
value=bf84cffccc763f408c57dcc53f2c450f name=_csrf_token

and that's wrong.
After some testing i found that if i call the setNameFormat *after*
the setWidgets everything works right!
Can this be considered a bug or what else?

Online docs ( http://www.symfony-project.org/gentle-introduction/1_4/en/10-Forms
) doesn't say nothing about this and instead they have a error.
They say we can call setNameFormat as a method of sfForm ( $this-
setNameFormat('contact[%s]'); ) . It looks to me wrong since it's a
sfWidgetFormSchema method and you can easily try it and see the method
not found error.

Can anyone confirm me these things?
I ask since last time i wrote to developers list reporting a still
existent (minor) bug i just got no reply at all. This just left me
alone thinking i was wrong.

Ettore Del Negro

-- 
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Database does not exist

2010-08-21 Thread chok
In the schema on the top you have to put the connection name like:

propel:
  ...

and not :

blog:
  ...

I don't very well attributes with propel but I think you have to put
_atributes: {connection: propel} or something like that. But the first
way is the simpliest ;-)

This is solve your problem ?



On 21 août, 15:07, chok chok...@gmail.com wrote:
 And in your propel.ini ?

 On 21 août, 13:23, Paolo90 paolomari...@gmail.com wrote:

  Thanks for your reply, but it seems it doesn't work anyway! :(

  On 20 Ago, 17:42, Quince quince.gib...@gmail.com wrote:

   I'm a new user so hopefully this solves your problem.  In your
   schema.yml file I believe you're missing the following line for each
   table:
   connection: propel

   This should be a level below the table name.  For instance:
   ---code-
   blog:
     connection: propel
   ---/code-

   HTH.

   On Aug 20, 10:29 am, Paolo90 paolomari...@gmail.com wrote:

Hi to everyone,
I'm a new Symfony's user, right now I'm trying to create my first
application but it seems I have a problem, when i execute the command
Propel:insert-sql i get the following error: Database blog does
not exist.
What makes me crazy is that i configured the database connection
several times and i also checked it more than once and it is correct
and of course the blog database exist on my MySql serverI dont
have any idea on how i get rid of this error..
I'm using symfony 1.4.

Here there post the database.yml file:
 dev:
  propel:
    param:
      classname: DebugPDO
      debug: { realmemoryusage: true, details: { time: { enabled:
true }, slow: { enabled: true, threshold: 0.1 }, mem: { enabled:
true }, mempeak: { enabled: true }, memdelta: { enabled: true } } }
test:
  propel:
    param:
      classname: DebugPDO
all:
  propel:
    class: sfPropelDatabase
    param:
      classname: PropelPDO
      dsn: 'mysql:host=localhost;dbname=blog'
      username: root
      password: null
      encoding: utf8
      persistent: true
      pooling: true

the schema.yml:

blog:
  _attributes:
    defaultIdMethod: native
  post:
    _attributes: { phpName: Post }
    id: { type: integer, required: true, primaryKey: true,
autoIncrement: true }
    create_at: { type: timestamp, required: true }
    updated_at: { type: timestamp, required: false }
    title: { type: varchar, size: '100', required: true }
    body: { type: longvarchar, required: true }
  category:
    _attributes: { phpName: Category }
    id: { type: integer, required: true, primaryKey: true,
autoIncrement: true }
    created_at: { type: timestamp, required: true }
    updated_at: { type: timestamp, required: false }
    name: { type: varchar, size: '50', required: true }
  partof:
    _attributes: { phpName: partOf }
    post_id: { type: integer, required: true, primaryKey: true,
foreignTable: post, foreignReference: id }
    cat_id: { type: integer, required: true, primaryKey: true,
foreignTable: category, foreignReference: id }

can anyone help me with this?!
Thank you!



-- 
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Database does not exist

2010-08-21 Thread Paolo90
Ok,now I'm not at home so I can't try it, but I'll tell you if it
works, thanks.

On 21 Ago, 15:20, chok chok...@gmail.com wrote:
 In the schema on the top you have to put the connection name like:

 propel:
   ...

 and not :

 blog:
   ...

 I don't very well attributes with propel but I think you have to put
 _atributes: {connection: propel} or something like that. But the first
 way is the simpliest ;-)

 This is solve your problem ?

 On 21 août, 15:07, chok chok...@gmail.com wrote:



  And in your propel.ini ?

  On 21 août, 13:23, Paolo90 paolomari...@gmail.com wrote:

   Thanks for your reply, but it seems it doesn't work anyway! :(

   On 20 Ago, 17:42, Quince quince.gib...@gmail.com wrote:

I'm a new user so hopefully this solves your problem.  In your
schema.yml file I believe you're missing the following line for each
table:
connection: propel

This should be a level below the table name.  For instance:
---code-
blog:
  connection: propel
---/code-

HTH.

On Aug 20, 10:29 am, Paolo90 paolomari...@gmail.com wrote:

 Hi to everyone,
 I'm a new Symfony's user, right now I'm trying to create my first
 application but it seems I have a problem, when i execute the command
 Propel:insert-sql i get the following error: Database blog does
 not exist.
 What makes me crazy is that i configured the database connection
 several times and i also checked it more than once and it is correct
 and of course the blog database exist on my MySql serverI dont
 have any idea on how i get rid of this error..
 I'm using symfony 1.4.

 Here there post the database.yml file:
  dev:
   propel:
     param:
       classname: DebugPDO
       debug: { realmemoryusage: true, details: { time: { enabled:
 true }, slow: { enabled: true, threshold: 0.1 }, mem: { enabled:
 true }, mempeak: { enabled: true }, memdelta: { enabled: true } } }
 test:
   propel:
     param:
       classname: DebugPDO
 all:
   propel:
     class: sfPropelDatabase
     param:
       classname: PropelPDO
       dsn: 'mysql:host=localhost;dbname=blog'
       username: root
       password: null
       encoding: utf8
       persistent: true
       pooling: true

 the schema.yml:

 blog:
   _attributes:
     defaultIdMethod: native
   post:
     _attributes: { phpName: Post }
     id: { type: integer, required: true, primaryKey: true,
 autoIncrement: true }
     create_at: { type: timestamp, required: true }
     updated_at: { type: timestamp, required: false }
     title: { type: varchar, size: '100', required: true }
     body: { type: longvarchar, required: true }
   category:
     _attributes: { phpName: Category }
     id: { type: integer, required: true, primaryKey: true,
 autoIncrement: true }
     created_at: { type: timestamp, required: true }
     updated_at: { type: timestamp, required: false }
     name: { type: varchar, size: '50', required: true }
   partof:
     _attributes: { phpName: partOf }
     post_id: { type: integer, required: true, primaryKey: true,
 foreignTable: post, foreignReference: id }
     cat_id: { type: integer, required: true, primaryKey: true,
 foreignTable: category, foreignReference: id }

 can anyone help me with this?!
 Thank you!

-- 
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Doctrine : many to many with refclass

2010-08-21 Thread Md Mostafizur Rahman milon
 Hello Diem Member
i am new in Symfony. plz follow this Schema ,here many to many
relations exist between User and Permission and refclass name
UserPermission . Now i am try create query between User and
UserPermission . how is possible ?


User:
  columns:
username: string(255)
password: string(255)
  relations:
 Permissions:
  class: Permission
  refClass: UserPermission
  foreignAlias: Users


Permission:
  columns:
name: string(255)



UserPermission:
  columns:
user_id:
  type: integer
  primary: true
permission_id:
  type: integer
  primary: true
  relations:
User:
Permission:

-- 
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Doctrine : many to many with refclass

2010-08-21 Thread Ettore
I don't know if this can solve your problem, anyway have a look at
http://www.doctrine-project.org/projects/orm/1.2/docs/manual/defining-models/en#relationships:join-table-associations

With user-Permissions you should get a Doctrine_Collection of
Doctrine_Records .
Creating a new tuple shuld be like:
$userPerm = new UserPermission:
$userPerm-User = new User() (or existing one)
$userPerm-Permission = new Permission() (or existing one)

I'm going to facing this problem next days for a project, so i'm not
really sure if that's right.

-- 
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Database does not exist

2010-08-21 Thread Paolo90
well, now i get the following error:

Execution of target insert-sql failed for the following reason: /
Library/WebServer/Documents/blog/lib/vendor/symfony/lib/plugins/
sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:272:1:
[wrapped: SQLSTATE[HY000] [2002] No such file or directory]
[phing] /Library/WebServer/Documents/blog/lib/vendor/symfony/lib/
plugins/sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:
272:1:  [wrapped: SQLSTATE[HY000] [2002] No such file or directory]

this is driving me crazy!! haha

On 21 Ago, 15:20, chok chok...@gmail.com wrote:
 In the schema on the top you have to put the connection name like:

 propel:
   ...

 and not :

 blog:
   ...

 I don't very well attributes with propel but I think you have to put
 _atributes: {connection: propel} or something like that. But the first
 way is the simpliest ;-)

 This is solve your problem ?

 On 21 août, 15:07, chok chok...@gmail.com wrote:



  And in your propel.ini ?

  On 21 août, 13:23, Paolo90 paolomari...@gmail.com wrote:

   Thanks for your reply, but it seems it doesn't work anyway! :(

   On 20 Ago, 17:42, Quince quince.gib...@gmail.com wrote:

I'm a new user so hopefully this solves your problem.  In your
schema.yml file I believe you're missing the following line for each
table:
connection: propel

This should be a level below the table name.  For instance:
---code-
blog:
  connection: propel
---/code-

HTH.

On Aug 20, 10:29 am, Paolo90 paolomari...@gmail.com wrote:

 Hi to everyone,
 I'm a new Symfony's user, right now I'm trying to create my first
 application but it seems I have a problem, when i execute the command
 Propel:insert-sql i get the following error: Database blog does
 not exist.
 What makes me crazy is that i configured the database connection
 several times and i also checked it more than once and it is correct
 and of course the blog database exist on my MySql serverI dont
 have any idea on how i get rid of this error..
 I'm using symfony 1.4.

 Here there post the database.yml file:
  dev:
   propel:
     param:
       classname: DebugPDO
       debug: { realmemoryusage: true, details: { time: { enabled:
 true }, slow: { enabled: true, threshold: 0.1 }, mem: { enabled:
 true }, mempeak: { enabled: true }, memdelta: { enabled: true } } }
 test:
   propel:
     param:
       classname: DebugPDO
 all:
   propel:
     class: sfPropelDatabase
     param:
       classname: PropelPDO
       dsn: 'mysql:host=localhost;dbname=blog'
       username: root
       password: null
       encoding: utf8
       persistent: true
       pooling: true

 the schema.yml:

 blog:
   _attributes:
     defaultIdMethod: native
   post:
     _attributes: { phpName: Post }
     id: { type: integer, required: true, primaryKey: true,
 autoIncrement: true }
     create_at: { type: timestamp, required: true }
     updated_at: { type: timestamp, required: false }
     title: { type: varchar, size: '100', required: true }
     body: { type: longvarchar, required: true }
   category:
     _attributes: { phpName: Category }
     id: { type: integer, required: true, primaryKey: true,
 autoIncrement: true }
     created_at: { type: timestamp, required: true }
     updated_at: { type: timestamp, required: false }
     name: { type: varchar, size: '50', required: true }
   partof:
     _attributes: { phpName: partOf }
     post_id: { type: integer, required: true, primaryKey: true,
 foreignTable: post, foreignReference: id }
     cat_id: { type: integer, required: true, primaryKey: true,
 foreignTable: category, foreignReference: id }

 can anyone help me with this?!
 Thank you!

-- 
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Doctrine : many to many with refclass

2010-08-21 Thread Sebastien Armand [Pink]
If you change your UserPermission definition to this:

UserPermission:
 columns:
   user_id:
 type: integer
 primary: true
   permission_id:
 type: integer
 primary: true
 relations:
   User:
  foreignAlias: UserPermissions
   Permission:

Then you will be able to use: $user-getUserPermissions();

If you just want to create a standard query, then just use the names of the
tables like maybe:
UserTable::getInstance()-createQuery('u')-leftJoin('UserPermission
p')-where('p.some_field = ?', 89);

Hope this is what you were looking for, I'm not quite sure what your
question actually is ;)






2010/8/21 Ettore ete@gmail.com

 I don't know if this can solve your problem, anyway have a look at

 http://www.doctrine-project.org/projects/orm/1.2/docs/manual/defining-models/en#relationships:join-table-associations

 With user-Permissions you should get a Doctrine_Collection of
 Doctrine_Records .
 Creating a new tuple shuld be like:
 $userPerm = new UserPermission:
 $userPerm-User = new User() (or existing one)
 $userPerm-Permission = new Permission() (or existing one)

 I'm going to facing this problem next days for a project, so i'm not
 really sure if that's right.

 --
 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
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


-- 
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
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en