Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.0.14, 1.2.2, 1.2.3
-
Fix Version/s: 1.2.3
-
Component/s: Connection, I18n
-
Labels:None
-
Environment:MySQL 5.1.37
PHP 5.2.11
symfony 1.2.11 DEV
symfony 1.4.13
PHP 5.3.6
Postgres 8.4.8
Description
I used to work with a single database named "doctrine". The query was working properly.
I then decided to use 2 databases so I got my schema like this:
connection: doctrine
Category:
actAs:
I18n:
actAs:
Sluggable:
fields: [name]
Timestampable: ~
fields: [name, description]
columns:
id: ~
name:
type: string(255)
notnull: true
description: stringUser:
connection: second
columns:
id: ~
name:
type: string(255)
notnull: true
I did setup my connections in config/databases.yml this way:
all:
doctrine:
// ....
second:
// ....
build-model, build-forms, build-filters and cc got ran. But now, I got an exception saying the "Translation" relation doesn't exist. The Base Models include correctly the bindComponent line:
Doctrine_Manager::getInstance()->bindComponent('Category', 'doctrine');
For now, I managed to kind of fixing it with simply swapping the databases order in my config/databases.yml and it's now working again perfectly.
I forgot to mention that in the CategoryTable when i call $this->getConnection()->getName(), it outputs "second"
Activity
| Field | Original Value | New Value |
|---|---|---|
| Description |
I used to work with a single database named "doctrine". The query was working properly. I then decided to use 2 databases so I got my schema like this: {quote} connection: doctrine Category: actAs: I18n: actAs: Sluggable: fields: [name] Timestampable: ~ fields: [name, description] columns: id: ~ name: type: string(255) notnull: true description: string User: connection: second columns: id: ~ name: type: string(255) notnull: true {quote} I did setup my connections in config/databases.yml this way: {quote} all: doctrine: // .... second: // .... {quote} build-model, build-forms, build-filters and cc got ran. But now, I got an exception saying the "Translation" relation doesn't exist. The Base Models include correctly the bindComponent line: {quote} Doctrine_Manager::getInstance()->bindComponent('Category', 'doctrine'); {quote} For now, I managed to kind of fixing it with simply swapping the databases order in my config/databases.yml and it's now working again perfectly. |
I used to work with a single database named "doctrine". The query was working properly. I then decided to use 2 databases so I got my schema like this: {quote} connection: doctrine Category: actAs: I18n: actAs: Sluggable: fields: [name] Timestampable: ~ fields: [name, description] columns: id: ~ name: type: string(255) notnull: true description: string User: connection: second columns: id: ~ name: type: string(255) notnull: true {quote} I did setup my connections in config/databases.yml this way: {quote} all: doctrine: // .... second: // .... {quote} build-model, build-forms, build-filters and cc got ran. But now, I got an exception saying the "Translation" relation doesn't exist. The Base Models include correctly the bindComponent line: {quote} Doctrine_Manager::getInstance()->bindComponent('Category', 'doctrine'); {quote} For now, I managed to kind of fixing it with simply swapping the databases order in my config/databases.yml and it's now working again perfectly. I forgot to mention that in the CategoryTable when i call $this->getConnection()->getName(), it outputs "second" |
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | 1.2.3 [ 10051 ] | |
| Resolution | Fixed [ 1 ] |
| Affects Version/s | 1.2.2 [ 10047 ] |
| Affects Version/s | 1.2.3 [ 10051 ] | |
| Environment |
MySQL 5.1.37 PHP 5.2.11 symfony 1.2.11 DEV |
MySQL 5.1.37 PHP 5.2.11 symfony 1.2.11 DEV symfony 1.4.13 PHP 5.3.6 Postgres 8.4.8 |
- Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DC-363, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
I'm experiencing the same issue with 4 connections. The I18n behavior is almost unusable for models whose connection is not the last one defined. I searched for an acceptable solution but I haven't found one (IMHO the setting to the right connection before each query is not acceptable in large projects). I tried to do like in Search behavior, but it didn't work, I doesn't know enough doctrine internals to understand why.