Hello,

I have a problem with a doctrine request which uses a link between two
differents databases.

The schema :
======================================
# config/doctrine/schema.yml
rsource:
  connection: doctrine1
  columns:
    oid: {type: integer, primary: true}
    nameres: { type: string(255) }
    surnameres: { type: string(255) }
    profilRes: { type: string(255) }
    typeRes: { type: integer, notnull: true }

TrackerPret:
  actAs: { Timestampable: ~ }
  connection: doctrine
  attributes:
    export: tables
  columns:
    date_affectation:   { type: timestamp, notnull: true }
    date_retour: { type: timestamp, notnull: true }
    date_retour_reel:   { type: timestamp, notnull: true }
    nom_utilisateur:    { type: string(255) }
    prenom_utilisateur: { type: string(255) }
    id_manager: { type: integer, notnull: true }
    code_projet: { type: string(255) }
    id_article: { type: integer, notnull: true }
    commentaire_pret: { type: string(4000), notnull: true }
    oid_cdp: { type: integer, notnull: true }
    oid_user: { type: integer, notnull: true }
    oid_prj: { type: integer, notnull: true }
  relations:
    TrackerManager: {local: id_manager, foreign: id,foreignAlias:
TrackerManagers }
    TrackerArticle: {local: id_article, foreign: id,foreignAlias:
TrackerArticles }
    USER: {class: rsource, local: oid_user, foreign: oid,foreignAlias:
ASAusers }
    CDP: {class: rsource, local: oid_cdp, foreign: oid,foreignAlias:
ASAcdps }
    PRJ: {class: project, local: oid_prj, foreign: oid,foreignAlias:
ASAprjs }
============================================================================

Myrequest :

$query = Doctrine::getTable('TrackerPret')
        ->createQuery('t')
        ->innerJoin('t.CDP c');
        //echo $query->getSqlQuery();
        //echo $query->execute();
        $users = $query->fetchArray();
        print_r($users);
===============================================================
The erreor :
SQLSTATE[42S02]: Base table or view not found: 1146 Table
'asadata.tracker_pret' doesn't exist.
Failing Query: "SELECT t.id AS t__id, t.date_affectation AS
t__date_affectation,
t.date_retour AS t__date_retour, t.date_retour_reel AS
t__date_retour_reel,
t.nom_utilisateur AS t__nom_utilisateur, t.prenom_utilisateur AS
t__prenom_utilisateur,
t.id_manager AS t__id_manager, t.code_projet AS t__code_projet,
t.id_article AS t__id_article,
t.commentaire_pret AS t__commentaire_pret, t.oid_cdp AS t__oid_cdp,
t.oid_user AS t__oid_user, t.oid_prj
AS t__oid_prj, t.created_at AS t__created_at, t.updated_at AS
t__updated_at, r.oid AS r__oid,
 r.nameres AS r__nameres, r.surnameres AS r__surnameres, r.profilres
AS r__profilres, r.typeres
 AS r__typeres FROM tracker_pret t INNER JOIN rsource r ON t.oid_cdp =
r.oid"

==================================================
The request seems good and the aliase (CDP) is correctly interpreted.
So why the erreor is about a
"weird" concatenated string "asadata.tracker_pret" ?

Thank you for your help

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

Reply via email to