logo       

[symfony-users] Symfony+PGSQL+Doctrine: msg#00881

symfony-users

Subject: [symfony-users] Symfony+PGSQL+Doctrine

[B]Hi there:[/B]
I have found this address:
http://prendreuncafe.com/blog/post/2008/10/31/Playing-with-symfony-12-and-Doctrine
and I have been trying to make it work, but it doesn't, this is what happens.
[img]index.php/fa/1219/0/[/img]

Could someone please tell me what to do, this is my [B]config.php[/B].

<?php

sfConfig::set('sf_orm', 'doctrine');
if (!sfConfig::get('sf_admin_module_web_dir'))
{
sfConfig::set('sf_admin_module_web_dir', '/sfDoctrinePlugin');
}

if (sfConfig::get('sf_web_debug'))
{
require_once
dirname(__FILE__).'/../lib/debug/sfWebDebugPanelDoctrine.class.php';

[B][COLOR=blue]$this->dispatcher->connect('debug.web.load_panels',
array('sfWebDebugPanelDoctrine', 'listenToAddPanelEvent'));[/COLOR][/B]//this
is the code line on wich I have the problem.
}

require_once sfConfig::get('sfDoctrinePlugin_doctrine_lib_path',
dirname(__FILE__).'/../lib/vendor/doctrine/Doctrine.php');
spl_autoload_register(array('Doctrine', 'autoload'));

$manager = Doctrine_Manager::getInstance();
$manager->setAttribute('export', 'all');
$manager->setAttribute('validate', 'all');
$manager->setAttribute('recursive_merge_fixtures', true);
$manager->setAttribute('auto_accessor_override', true);
$manager->setAttribute('autoload_table_classes', true);

$configuration = sfProjectConfiguration::getActive();

if (method_exists($configuration, 'configureDoctrine'))
{
$configuration->configureDoctrine($manager);
}

This is my [B]databases.yml[/B].

all:
doctrine:
class: sfDoctrineDatabase
param:
dsn: pgsql://postgres:1234@localhost/db_symfony

This is my [B]schema.yml[/B]

BlogPost:
actAs:
Sluggable:
fields: [title]
Timestampable:
columns:
title: string(255)
body: clob
author: string(255)

BlogComment:
actAs: [Timestampable]
columns:
blog_post_id: integer
author: string(255)
email: string(255)
content: clob
relations:
BlogPost:
class: BlogPost
local: blog_post_id
foreign: id
foreignType: many
type: one

This is my [B]data.yml[/B]

BlogPost:
p1:
title: My first post
body: |
This is cool.
author: NiKo
created_at: "<?php echo date('Y-m-d H:i:s', time() - 86400) ?>"
p2:
title: My second post
body: |
This is still cool.
author: NiKo
created_at: "<?php echo date('Y-m-d H:i:s', time() - 7200) ?>"
p3:
title: Third post
body: |
Is this one cool?
author: Roger Hanin
created_at: "<?php echo date('Y-m-d H:i:s') ?>"

BlogComment:
c1:
BlogPost: p3
author: John
email: john@xxxxxxx
content: Hey, you're right there.
created_at: "<?php echo date('Y-m-d H:i:s', time() - 86400) ?>"
c2:
BlogPost: p3
author: Paul
email: paul@xxxxxxx
content: Nope, he's not.
created_at: "<?php echo date('Y-m-d H:i:s') ?>"

Please someone tell me what to do.
Thanks in advance :d .
guelmis

--





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

Attachment: printscreen.JPG
Description: JPEG image

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise