This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » symfony 1.3 and 1.4 » symfony 1.4 Doctrine and PostgreSQL
symfony 1.4 Doctrine and PostgreSQL [message #103237] Thu, 29 July 2010 14:20
ZargosLord  is currently offline ZargosLord
Messages: 12
Registered: December 2008
Junior Member
Hi,

i've set up Symfony 1.4.
I have a Postgresql 8.4 database.

I've done the folowing comand to configure my database:

php symfony configure:database --name=TestDoctrine --class=sfDoctrineDatabase "pgsql:host=localhost;dbname=TestDoctrine" user password

The:

php symfony doctrine:build-schema

To build the schema from my database.
In my database there is only one table defined like this (retrieved via pgadminIII):

-- Table: test1
CREATE TABLE test1
(
id serial NOT NULL,
nom character varying(128)[],
"type" integer,
CONSTRAINT test1_pk PRIMARY KEY (id)
)
WITH (
OIDS=FALSE
);
ALTER TABLE test1 OWNER TO user;

but the doctrine command give me this error:

SQLSTATE[42P01]: Undefined table: 7 ERREUR: entrée manquante de la clause FROM pour la table « t »
LINE 6: t.typtype AS typtype,
^. Failing Query: "SELECT
ordinal_position as attnum,
column_name as field,
udt_name as type,
data_type as complete_type,
t.typtype AS typtype,
is_nullable as isnotnull,
column_default as default,
(
SELECT 't'
FROM pg_index, pg_attribute a, pg_class c, pg_type t
WHERE c.relname = table_name AND a.attname = column_name
AND a.attnum > 0 AND a.attrelid = c.oid AND a.atttypid = t.oid
AND c.oid = pg_index.indrelid AND a.attnum = ANY (pg_index.indkey)
AND pg_index.indisprimary = 't'
AND format_type(a.atttypid, a.atttypmod) NOT LIKE 'information_schema%'
) as pri,
character_maximum_length as length
FROM information_schema.COLUMNS
WHERE table_name = 'agtagents'
ORDER BY ordinal_position"

The t.typtype don't exist like this.
Either do the c.relname = table_name in the select 't'.

Is that a bug in doctrine?
i've check the lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Im port/Pgsql.php but it seems the select/request done use some field that didn t exist.
thus the pgsql.php file is bugged or not for this postgresql version?

thanx for reply. i'm lost for 3 days now about this problem.

Previous Topic:access user session from routing class
Next Topic:Workbench and foreignType
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software