English 中文(简体)
2. 穿透有活力的田地
原标题:Storing dynamic fields with Doctrine2

我们期望使用理论2,然而,我们想要提出一个特点,但对于它如何发挥作用却完全混淆不清。

我们希望我们的客户能够按照我们的标准目标界定习俗领域。 因此,这些领域将以理论为依据,而不是以理论为依据的物体定义的一部分。

我们的第一个想法是利用Nosql(mongodb或amazon dynamodb)储存其中一些数据,但由于我们想利用理论处理我们的核心目标,我们要坚持在理论领域,以实现这一目标,而不必扩大范围以储存这一数据。

one thing on my mind was using doctrine s ability to serialize/unserialize complex objects and just have like a hash of custom field names and their values as an extra property in the object, however, this would not allow us to have a feature that would search these fields if we ever wanted to allow that...

是否有任何人试图用理论2或任何变数这样做?

最佳回答

你可以考虑使用Doctrine ODM, 即Doctrine 2, 但对NSQL而言——我认为他们至少支持MongoDB。

Another approach would be to use serialization as you said. You probably shouldn t worry about search too much - I would recommend to use a separate fulltext search engine (Solr, ElasticSearch, or other) as they provide much more versatility and performance for search vs SQL fulltext search.

第三,你可以与NoSQL一道使用Doctrine。 在这种情况下,你可能应当把问询引向某类服务,以便你能够利用Doctrine查询贵方银行的数据,而另一些则询问其余数据。

Finally, you could consider using a key-value table. One column represents the key, another the value.

问题回答

暂无回答




相关问题
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 ...

热门标签