Re: [symfony-users] sfDoctrineGuardUser custom LDAP authenication funkyness

2010-05-08 Thread Sela Yair
this is app.yml in /config not app.yml in /apps/xxx
why does it redirects to backend? i had similar problem, but i think setting
that app.yml fixed it.

all:
  sf_guard_plugin:
success_signin_url: @homepage # the plugin use the referer as default
success_signout_url: @homepage # the plugin use the referer as
default

On 6 May 2010 18:55, webdev_aw_ucsb  wrote:

> Greetings all --
>
> I'm using Symfony 1.4.4
>
> I followed some example blog code provided here:
>
> http://blog.honnecke.us/2010/01/using-sfdoctrineguardusers-external-authentication/
>
> And I have in my custom authentication class the following attached
> code. I hit 2 different LDAP servers based upon the symfony app
> (frontend or backend) the user is logging into. My problem is that
> after login the user hitting frontend login is being redirected to a
> url at backend_dev.php/sfguard/user for example.
>
> Is there an sfDoctrineGuard login success redirect path I need to set
> for each apps routing? I'm confused how successful login at frontend
> redirects the user to the backend application ...
>
> ### attached code sample
> 
> class svCustomAuth
> {
>  protected static $port = 389; #SSL 636
>
>  public static function authenticate($u,$p)
>  {
>$app = sfContext::getInstance()->getConfiguration()-
> >getApplication();
>
>switch ($app)
>{
>  case 'frontend':
>#
># contact campus-wide directory and validate user.
>#
>$conn = @ldap_connect('campus.edu', self::$port);
>@ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3);
>@ldap_set_option($conn, LDAP_OPT_REFERRALS, 0);
>$dn = "uid=$u,o=campus,campusaffiliation=employee";
>return @ldap_bind($conn,$dn,$p);
>break;
>  case 'backend':
>#
># contact my dept only directory and validate help-desk user.
>#
>$conn = @ldap_connect('directory.my_department.campus.edu',
> self::$port);
>@ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3);
>@ldap_set_option($conn, LDAP_OPT_REFERRALS, 0);
>$dn = "uid=$u,cn=foo,dc=bar,dc=baz,dc=meta,dc=alpha";
>return @ldap_bind($conn,$dn,$p);
>break;
>  default:
>break;
>}
>  }
> }
> ?>
>
> --
> 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
>

-- 
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: load app.yml from task

2010-05-08 Thread gurkanoluc
I find the answer from forum. I have to add --application="blabla"
option when i'm calling task. Then it works!

On May 9, 12:09 am, gurkanoluc  wrote:
> Hi,
>
> I want to load frontend/config/app.yml file inside symfony task. I
> tried traditional sfConfig::get but it didn't work. Then i tried
> sfYaml class. Code i used to load with sfYaml is below.
>
> 
> sfYaml::load(dirname(dirname(dirname(__FILE__.'/apps/frontend/
> config/app.yml'
> 
>
> But this code returns the path i gave to function like this "/home/
> user/public_html/project/trunk/apps/frontend/config/app.yml".
>
> Is there anyway to do this?
>
> --
> 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 
> athttp://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


[symfony-users] load app.yml from task

2010-05-08 Thread gurkanoluc
Hi,

I want to load frontend/config/app.yml file inside symfony task. I
tried traditional sfConfig::get but it didn't work. Then i tried
sfYaml class. Code i used to load with sfYaml is below.


sfYaml::load(dirname(dirname(dirname(__FILE__.'/apps/frontend/
config/app.yml'


But this code returns the path i gave to function like this "/home/
user/public_html/project/trunk/apps/frontend/config/app.yml".

Is there anyway to do this?

-- 
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: Symfony 2 Documentation or Tutorials

2010-05-08 Thread jiggliemon
http://github.com/tirnanog06/Symfony2-Doctrine2-Test
Here's a good little example of using Doctrine 2.0 w/ Symfony 2.0.
He bases this little demo off of John Wage's Doctrine 2.0 and Symfony
2.0 tutorial,
but for some reason i couldn't get the cli stuff to work with the out
of the box sandbox.


See Also:
http://jwage.com/index.php/blog-post/using-symfony-2-and-doctrine-2

-Chase

On May 4, 2:07 am, James Cauwelier  wrote:
> lol...
>
> Anyway, the reasoning of the poster is not hard to understand.
> Learning a new framework takes time and effort and you don 't want to
> study information that will be old in just a few months.
>
> Well, you 'll have to start with sf1.4 and see how it goes.  sf1.4
> will stick around for some time since PHP5.3 will be required.  So you
> 'll be required to study new 5.3 features as well, besides symfony.
>
> James
>
> On May 1, 9:18 am, jiggliemon  wrote:
>
>
>
> > Does anyone know of any Documentation or Tutorials online for Symfony
> > 2?  I'm pretty new to Symfony, and since my slate is more or less
> > clean, i'd like to infect it with the 2.0 ways, and not get cloudy on
> > 1.4.
>
> > I'm most interested in how they're interacting w/ the new Doctrine
> > 2.0.  And CLI stuff.  Generating an application etc.
>
> > Anything would be great.
>
> > -Chase
>
> > --
> > 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 
> > athttp://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 
> athttp://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


[symfony-users] Re: insert sfguard user into a form

2010-05-08 Thread Billy Paradise
Thanks for such quick responses!

 $this->setPostedBy(sfContext::getInstance()->getUser()-
>getUsername());

worked for me.

Thanks also to Gabor but that solution did not work.

Billy

On May 8, 3:31 pm, El Duderino  wrote:
> This is what I have used to set values before saving a form with the
> user already logged in:
>
> lib/model/doctrine/Listing.class.php:
>
> class Listing extends BaseListing
> {
>   public function save(Doctrine_Connection $conn = null) {
>       $this->setUsername(sfContext::getInstance()->getUser()->getUsername());
>
>       return parent::save($conn);
>   }
>
> }
>
> On May 8, 9:24 pm, Billy Paradise  wrote:
>
>
>
>
>
> > Hi,
>
> > I'm trying to create a form, like a "shoutbox".
>
> > A user is logged in via sfGuard
>
> > They create new post.  I'm using the Jobeet example. The commented out
> > lines are what I thought would work. The "somebody" line works, but if
> > I try to insert the currently logged in username into the posted_by
> > column, it bombs out with the error:
>
> > Unknown method sfGuardUserTable::getUser
>
> > lib/model/doctrine/Listing.class.php:
>
> > class Listing extends BaseListing
> > {
>
> >   public function save(Doctrine_Connection $conn = null)
> >   {
> > //  $username=Doctrine_Core::getTable('sfGuardUser')->getUser();
>
> >   if (!$this->getPostedBy())
> >   {
> > //    $this->setPostedBy($username);
> >     $this->setPostedBy('somebody');
> >   }
>
> >   return parent::save($conn);
>
> > }
>
> > Please show me where I'm going wrong. Thanks!
>
> > --
> > 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 
> > athttp://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 
> athttp://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


[symfony-users] Re: insert sfguard user into a form

2010-05-08 Thread El Duderino
This is what I have used to set values before saving a form with the
user already logged in:

lib/model/doctrine/Listing.class.php:

class Listing extends BaseListing
{
  public function save(Doctrine_Connection $conn = null) {
  $this->setUsername(sfContext::getInstance()->getUser()-
>getUsername());
  return parent::save($conn);
  }
}



On May 8, 9:24 pm, Billy Paradise  wrote:
> Hi,
>
> I'm trying to create a form, like a "shoutbox".
>
> A user is logged in via sfGuard
>
> They create new post.  I'm using the Jobeet example. The commented out
> lines are what I thought would work. The "somebody" line works, but if
> I try to insert the currently logged in username into the posted_by
> column, it bombs out with the error:
>
> Unknown method sfGuardUserTable::getUser
>
> lib/model/doctrine/Listing.class.php:
>
> class Listing extends BaseListing
> {
>
>   public function save(Doctrine_Connection $conn = null)
>   {
> //  $username=Doctrine_Core::getTable('sfGuardUser')->getUser();
>
>   if (!$this->getPostedBy())
>   {
> //    $this->setPostedBy($username);
>     $this->setPostedBy('somebody');
>   }
>
>   return parent::save($conn);
>
> }
>
> Please show me where I'm going wrong. Thanks!
>
> --
> 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 
> athttp://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


Re: [symfony-users] insert sfguard user into a form

2010-05-08 Thread Gábor Fási
`$username=Doctrine_Core::getTable('sfGuardUser')->getUser();`

after executing this line, the value of $username is an sfGuardUser
object. You try to pass it to a function that expects a string. What
you need is this:

`$username=Doctrine_Core::getTable('sfGuardUser')->getUser()->getUsername();`

On Sat, May 8, 2010 at 21:24, Billy Paradise  wrote:
> Hi,
>
> I'm trying to create a form, like a "shoutbox".
>
> A user is logged in via sfGuard
>
> They create new post.  I'm using the Jobeet example. The commented out
> lines are what I thought would work. The "somebody" line works, but if
> I try to insert the currently logged in username into the posted_by
> column, it bombs out with the error:
>
> Unknown method sfGuardUserTable::getUser
>
> lib/model/doctrine/Listing.class.php:
>
> class Listing extends BaseListing
> {
>
>  public function save(Doctrine_Connection $conn = null)
>  {
> //  $username=Doctrine_Core::getTable('sfGuardUser')->getUser();
>
>  if (!$this->getPostedBy())
>  {
> //    $this->setPostedBy($username);
>    $this->setPostedBy('somebody');
>  }
>
>  return parent::save($conn);
> }
>
>
> Please show me where I'm going wrong. Thanks!
>
> --
> 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
>

-- 
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] insert sfguard user into a form

2010-05-08 Thread Billy Paradise
Hi,

I'm trying to create a form, like a "shoutbox".

A user is logged in via sfGuard

They create new post.  I'm using the Jobeet example. The commented out
lines are what I thought would work. The "somebody" line works, but if
I try to insert the currently logged in username into the posted_by
column, it bombs out with the error:

Unknown method sfGuardUserTable::getUser

lib/model/doctrine/Listing.class.php:

class Listing extends BaseListing
{

  public function save(Doctrine_Connection $conn = null)
  {
//  $username=Doctrine_Core::getTable('sfGuardUser')->getUser();

  if (!$this->getPostedBy())
  {
//$this->setPostedBy($username);
$this->setPostedBy('somebody');
  }

  return parent::save($conn);
}


Please show me where I'm going wrong. Thanks!

-- 
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] Include a create form from a different module in a showsuccess.php

2010-05-08 Thread El Duderino
I've spent all day trying to figure out how to incorporate an
independent form on a showSuccess.php page but with little success so
far.

The project has one table with its own module for requests to be
created/edited etc and a separate table / module to allow the creation
of comments related to a specific request.

Ideally, once a request has been created it can read with a form below
for comments to be made, also listed if comments have already been
created for that request.

The progress made lets the user to create comments on a separate new
action form, but the request id has to be selected from a drop-down
menu. I know that the request ID could be taken from the url but that
isn't very secure at all because a user could easily change the id in
the url and post comments to a different request. If the comments form
can't be included in the request page, maybe a form with the request
id as a hidden field but not sure how to work with that either.

Here is the Schema for the two tables/modules, request
(ConsultancyFree), comments (ConsultancyFreeCommunication):

ConsultancyFree:
  actAs:
Timestampable: ~
  columns:
title: { type: string(255), notnull: true }
comments: { type: string(1), notnull: true }
status: { type: boolean, notnull: true, default: 1 }
consultancy_type: { type: integer(1), notnull: true, default: 1 }
user_id: { type: integer(4), notnull: true }
  relations:
sfGuardUser: { local: user_id, foreign: id, foreignAlias:
ConsultancyUser }

ConsultancyFreeCommunication:
  actAs:
Timestampable: ~
  columns:
consultancy_id: { type: integer(10), notnull: true }
comments: { type: string(1), notnull: true }
user_id: { type: integer(4), notnull: true }
  relations:
sfGuardUser: { local: user_id, foreign: id, foreignAlias:
ConsultancyFreeCommunicationsUser }
ConsultancyFree: { local: consultancy_id, foreign: id,
foreignAlias: ConsultancyFreeCommunications }

Thanks!

-- 
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: Credentials problem

2010-05-08 Thread Tofuwarrior
ALSO: don't forget to logout and login when you change credentials on
a user as the credentials are set for the user on login
I came unstuck with that too.

And obviously clear the cache when you change the security.yml files



On May 8, 4:00 pm, Tofuwarrior  wrote:
> For anyone else having similar problems who finds this thread.
>
> If you are trying to secure individualmodulesI had no joy putting
> them in app/config/security.yml
>
> What worked was creating individual config/security.yml files for each
> module with:
> all:
>   is_secure: true
>  credentials: [foo,bar]
>
> etc
>
> This worked fine, doing it at the app/config level just meant symfony
> didn't restrict access.
>
> Hope this helps someone else.
>
> TW
> On Apr 1, 3:26 pm, wueb  wrote:
>
> > I solved.
>
> > The problem was because i was logged with a "is_super_admin" user!!
> > When that happens he ignore thecredentialsand he have full access to
> > everything!!
>
> --
> 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 
> athttp://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


[symfony-users] Re: Credentials problem

2010-05-08 Thread Tofuwarrior
For anyone else having similar problems who finds this thread.

If you are trying to secure individual modules I had no joy putting
them in app/config/security.yml

What worked was creating individual config/security.yml files for each
module with:
all:
  is_secure: true
  credentials: [foo,bar]

etc

This worked fine, doing it at the app/config level just meant symfony
didn't restrict access.

Hope this helps someone else.

TW
On Apr 1, 3:26 pm, wueb  wrote:
> I solved.
>
> The problem was because i was logged with a "is_super_admin" user!!
> When that happens he ignore thecredentialsand he have full access to
> everything!!

-- 
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: sf/doctrine performance

2010-05-08 Thread john
As already said, the best way to go is to split your task into many
runs.

This not only solves your memory problem, but in most cases it is also
faster, and more secure.

Johannes

On May 8, 5:30 am, dan  wrote:
> FOr my third attempt, I used plain old mysql_connect() etc. for just
> the most intensive part of the script. I was able to parse the file
> completely, but still gobbled up just over 1GB of RAM.
> If memory usage is going to be come an issue going forward, I'll
> simply convert more of the script to plain old mysql.
>
> I'd prefer to use Doctrine, of course, since it's simpler, more
> reliable, and fewer lines of code,
>
> Will using raw SQL via the Doctrine connection object still utilize
> PDO?
>
> Cheers,
>
> Dan
>
> On May 7, 9:20 pm, Thomas Rabaix  wrote:
>
>
>
> > Doctrine is not built to do such long process script : you should used raw
> > SQL with the doctrine connection object.
>
> > On Fri, May 7, 2010 at 9:38 AM, Alexandru-Emil Lupu 
> > wrote:
>
> > > Or, you can try to install php 5.3. It has a better garbage collector,
> > > so, your script will not die because of the memory issue ...
> > > I haven't seen you code or xml format, but after you parse each game
> > > ... unset() it (in php 5.3 works nice, and you have some nice results
> > > )
>
> > > On Fri, May 7, 2010 at 10:30 AM, Stéphane 
> > > wrote:
> > > > And do || processing on multiple servers if possible/needed.
> > > > Use stdin to retrieve to-compute xml parts for each segment. So you can
> > > pipe
> > > > your commands.
> > > > Cheers,
>
> > > > Before Printing, Think about Your Environmental Responsibility!
> > > > Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
>
> > > > On Fri, May 7, 2010 at 4:34 AM, ken  wrote:
>
> > > >> Or you can add optional argument offset and limit for your task. This
> > > >> however is not for sql but for the xml. The idea is to process only a
> > > >> part of the xml for a given run. This will allow you to run the task
> > > >> in many segments.
>
> > > >> On May 7, 10:17 am, dan  wrote:
> > > >> > Hmm - I don't think this is going to work.
>
> > > >> > I ran the script and it got killed after 51 of 700+ games, with 21000
> > > >> > TyperefGame relationship records. It was consuming over 1.5GB of RAM.
> > > >> > I understand PDO is a memory hog, so may have to refactor using
> > > >> > mysql_query() etc. :(
>
> > > >> > Any ideas are more than welcome :)
>
> > > >> > Cheers,
>
> > > >> > Dan.
>
> > > >> > On May 7, 8:31 am, dan  wrote:
>
> > > >> > > Hi all,
>
> > > >> > > I have a large XML file (140+MB) which I'm parsing with an sf Task.
>
> > > >> > > It's a complicated structure, and contains some interesting
> > > >> > > relationships.
>
> > > >> > > The approach I'm using is to open the XML file with XMLReader, and
> > > >> > > when I find a node of interest, convert that node to a SimpleXML
> > > >> > > object, and then build my sf Records.
>
> > > >> > > Without going into too much detail, I have a few record types that
> > > are
> > > >> > > of primary interest; Game, Handset, Category.
>
> > > >> > > Relating Games to Categories is easy, however Games and Handsets 
> > > >> > > are
> > > >> > > related via a Typeref, i.e. Games are published for certain
> > > Typerefs,
> > > >> > > while each handset supports one or two different Typerefs.
>
> > > >> > > So I've also created tables for Typeref, TyperefGame and
> > > >> > > TyperefHandset in order to manage the relationships.
>
> > > >> > > Here's my real question:
>
> > > >> > > As my Task parses each Game, it looks up each of the Typerefs
> > > (approx
> > > >> > > 450 per game) associated with the game and creates the TyperefGame
> > > >> > > relationship record. With 700+ games, that's about 315000 records.
>
> > > >> > > As you can imagine, this takes some time, and I'm looking for every
> > > >> > > opportunity to speed it up.
>
> > > >> > > My first attempt was simply to create a new Doctrine Record for 
> > > >> > > each
> > > >> > > Typeref, setting the necessary attributes and then saving it. This
> > > was
> > > >> > > slow. (around 450 save()s per game)
>
> > > >> > > My second attempt was to create a Typeref Doctrine Collection for
> > > each
> > > >> > > game, and then do one save() on the collection once all Typerefs 
> > > >> > > had
> > > >> > > been parsed. I expected this to be faster that my first method, but
> > > if
> > > >> > > anything, it appears slower.
>
> > > >> > > What should my third attempt be?
>
> > > >> > > Should I be building a single large raw SQL statement for each 
> > > >> > > game-
> > > >> > > load of Typerefs?
>
> > > >> > > Is there an even better way to approach this whole Task?
>
> > > >> > > Your thoughts and advice would be greatly appreciated.
>
> > > >> > > Cheers,
>
> > > >> > > Dan.
>
> > > >> > > --
> > > >> > > If you want to report a vulnerability issue on symfony, please send
> > > it
> > > >> > > to security at symfony-project.com
>
> > > >> > > You rec

Re: [symfony-users] Re: sf/doctrine performance

2010-05-08 Thread Gábor Fási
Yes, doctrine gives you the PDO connection it uses.

On Sat, May 8, 2010 at 05:30, dan  wrote:
> Will using raw SQL via the Doctrine connection object still utilize
> PDO?

-- 
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