Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8470889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:38:38+00:00 2026-06-10T16:38:38+00:00

In my Symfony2 browsergame I have an user entity using the Doctrine 2 ORM.

  • 0

In my Symfony2 browsergame I have an user entity using the Doctrine 2 ORM. The game has two instances, classic and speed, which are mainly independent from each other and are using both its own databases (same structure). The only problem is that users are able to connect their accounts, so some basic user informations of the connected account shall be shown. For that I have a classic_id and speed_id as properties which connect to another user entity. But that would be a a cross database join which is not possible in Doctrine 2 as far as I found out. I also found that it is possible to have multiple entity managers with their own connections, but I think they can only be applied to complete bundles, right?

So here I need some workaround for that problem, what is the easiest way to do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T16:38:40+00:00Added an answer on June 10, 2026 at 4:38 pm

    Actually there is possibility to do cross db joins, but it’s rather trick than a feature and I do not recommend use it.

    To separate entities from one bundle between different entity managers you can use “dir” attribute which points to managed entities. For example:

    doctrine:
        orm:
            default_entity_manager:   default
            entity_managers:
                default:
                    connection:       default
                    mappings:
                        AppBundle:
                            dir:      Path/To/EntityFolder1
                anotherone:
                    connection:       anotherconnection
                    mappings:
                        AppBundle:
                            dir:      Path/To/EntityFolder2
    

    There is also poor documented “prefix” option, but I didn’t figure out what it is yet (you can experiment by yourself:))

    Greetings!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using symfony2 and have accessed an entity using a doctrine query, which I
I'm using Symfony2 to authenticate users. And I have two databases to store user
This is with Symfony2 and Doctrine2. I have this in my user entity: public
Symfony2 and FOS User Bundle issue... I have implemented my own login form in
I'm using Symfony2 Framework, and I want to update an entity with data from
Using Symfony2 and Doctrine ODM with MongoDB, I need to access the parent document
In Symfony2, how can I go about adding Doctrine's entity manager to a custom
I'm using symfony2. I have a form, and I want to print it a
In Symfony2 RC3, I am trying to create a related entity on a User
Using Symfony2 and orm.yml files to map the entities into the database how can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.