English 中文(简体)
理论产生实体包括类名中的方程式名称
原标题:Doctrine generate entities includes the schema name in class names

当我从现有的 Postgres 数据库中生成带有理论的实体时, 创建的文件为表单 :

  • class Public.blog
  • class Public.post
  • etc

I. e. 我的数据库“ schema” 名称被包含在类名和文件名中。 这又使类名因“ ” 而被定为非法 。

How can I specify that I do not want the database schema name included in my class names?

还是我走错路了?

Extra info - The command is fine. My files are created correctly, however the class names are still "Public.blog" - Symfony2 manages to generate the same files without the Public schema/namespace. So it is possible! However, finding the part of the code that makes this happen is proving difficult!

问题回答

我所做的是暂时将我所有的桌子移入公共系统,并生成实体和圆柱页。然后我把桌子移回原位,修改了/src/Etc/MyBundle/Resources/config/doctrine的文档,以便它们的表格:我的表格条目现在是表格: MySchema.my表。

然后一切就都顺利了





相关问题
Entity Framework with File-Based Database

I am in the process of developing a desktop application that needs a database. The application is currently targeted to SQL Express 2005 and works wonderfully. However, I m not crazy about having ...

Assistance with CakePHP model relationships

How would I represent the following in a CakePHP model? Product ======= product_id .... Cart ==== cart_id .... Carts_Products ============== cart_id product_id quantity

join across databases with nhibernate

I am trying to join two tables that reside in two different databases. Every time, I try to join I get the following error: An association from the table xxx refers to an unmapped class. If the ...

How are Models (in MVC) and DAOs supposed to interact?

How are models and DAOs supposed to interact? I m in the process of putting together a simple login module and I m unsure where to put the "business logic." If I put the logic with the data in the ...

Convert date to string upon saving a doctrine record

I m trying to migrate one of my PHP projects to Doctrine. I ve never used it before so there are a few things I don t understand. In my current code, I have a class similar to this: class ...

热门标签