multiple connections with doctrine in symfony 2.3(symfony 2.3 中与学说的多重联系)
问题描述
所以我试图在我的 symfony 项目中与教义建立多重联系.
So I'm trying to do a multiple connection with doctrine in my symfony project.
首先,我只使用一个数据库,然后我需要添加另一个.
First, I was only using one database, then I needed to add another.
这是以前的:
一切正常
然后我添加了抓取"数据库:
THEN I added the "crawl" database :
我摆脱了 auto_mapping &添加了一些东西
I got rid of the auto_mapping & added few things
但是,现在我失去了与外联网的连接(例如,用户无法再登录)
BUT, now I lost connection to extranet (users can't loggin anymore for example)
有什么想法吗?(如果你读到那么远,谢谢;))
Any ideas? (and thanks if you read that far ;) )
编辑
遵循 http://symfony.com/doc/2.3/reference/configuration/doctrine.html#mapping-entities-outside-of-a-bundle 我尝试使用相同的语法:
following http://symfony.com/doc/2.3/reference/configuration/doctrine.html#mapping-entities-outside-of-a-bundle I tried to have the same syntax :
还是不行……
编辑 2
也不行
推荐答案
我不知道为什么/如何,但它有效
I donno why/how but it works
代码如下:
问题是我一开始就尝试过,但失败了(在...中找不到类 X)
the thing is that I tried that at the start and it failed (the class X not found in...)
如果有人有解释,我会非常乐意阅读.
If anyone has an explenation, I'll be more than happy to read it.
还是谢谢
这是问题的第二部分,下面是开始:类在链配置的命名空间中找不到X"...当我尝试与学说进行多重连接时
This was the 2nd part of the question, here's the begening : The class 'X' was not found in the chain configured namespaces ... when I try a multiple connection with doctrine
这篇关于symfony 2.3 中与学说的多重联系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!