Questions tagged [doctrine]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
341 views

Multiple application sharing same database functionalities

We have two application A and B that I'm refactoring. They both use the same database. Those application are written using the Symfony framework and Doctrine as database layer. I've moved some of the ...
Nicolas Appriou's user avatar
2 votes
1 answer
2k views

Entities and polymorphic relationships

Lets say that I have a shelf on which I can put items that are shelfable (not sure if that is actually a word but you can understand my point). So I have the following: class Shelf { /** @var ...
mysubject's user avatar
0 votes
2 answers
2k views

Should i use an abstract class or an interface for my doctrine model?

In Doctrine, assuming I want to implement different types of vehicles. Maybe a car, a plane, a bicycle and so on ... all these vehicles have many different properties but also very common things like ...
Jim Panse's user avatar
  • 388
6 votes
4 answers
591 views

How to design an unpredictable model?

I have been working on a project that deals with, let me simplify, Schools and Students. The general requirement is that certain Students could be assigned to certain Schools to work an internship. ...
Đuro Mandinić's user avatar
1 vote
1 answer
412 views

What are the benefits of using lazy initialization when i.e. calling Doctrine's EntityManager?

TL;DR: I have noted that some tutorials are using an extra method call to retrieve a variable, in my case EntityManager of Doctrine. Is it generally a good idea to use such extra method call, when it ...
Dennis's user avatar
  • 8,187
1 vote
1 answer
126 views

Why does ORM persist() functionality use references to populate insert_id and not return?

My understanding of how ORM persist works: //ORM "persist" oversimplification function persist(&$entity) { ... $insertId = api_actual_db_insert(...); $entity->setId($insertId); } /...
Dennis's user avatar
  • 8,187
1 vote
1 answer
97 views

How to associate both a collection and one item of this collection to an entity

I'm working on a project in which I have an entity, we may call Users and another entity Address. I want to define the entity User in a way that an user would have a collection of addresses (...
ibi0tux's user avatar
  • 241
0 votes
1 answer
375 views

Multiple intranet/internet systems partially working on same data - database strategy

We are starting rewritting our apps (Internet portal, millions of unique users and few CRM/ERP systems, few hundred users) and we have a huge decision to make now. We are going to write them mostly (...
ex3v's user avatar
  • 556
0 votes
1 answer
1k views

Doctrine 2 and Concrete table inheritance

I use Doctrine 2 and I've read some articles on inheritance strategies' mapping with ORM. I've seen three main strategies : "Class table inheritance", "Concrete table inheritance" and "Single table ...
csblo's user avatar
  • 239
1 vote
2 answers
2k views

Repository Pattern: Doctrine2 vs Microsoft Entity Framework?

I have been using Symfony2 with Doctrine2 for some years. I have recently started using Microsoft's Entity Framework with MVC5. From my Symfony2 experience I understand that a repository's job is only ...
d0001's user avatar
  • 111
3 votes
1 answer
318 views

Building a DBAL from scratch

I am considering building a DBAL from scratch with PHP to use within my projects and also to learn through the process. I have noticed on SO and other reputable forums that whenever this is mentioned ...
cecilli0n's user avatar
  • 261
1 vote
1 answer
79 views

When using an ORM should mappings be defined in the code file?

Doctrine offers three ways to define the object mapping properties: in XML, in YAML and as inline docblock annotations in the code. The Doctrine documentation doesn't give any advice on choosing ...
jwrush's user avatar
  • 249
0 votes
2 answers
3k views

Is my application vulnerable to SQL injection if I don't specify each type in Doctrine2?

I thought Doctrine 2 DBAL prepared statements were safe from SQLi. But I found this confusing bit in the docs: By default the Doctrine DBAL does no escaping. Escaping is a very tricky business to ...
ChocoDeveloper's user avatar
4 votes
2 answers
2k views

Is doctrine 2 fast enough? [closed]

I need to build a social network that is expecting very high traffic, 10k - 50k + registrations in a day, not even including visitors, pageviews, image uploads, etc..., a lot of database activity. We ...
Andrew Fashion's user avatar
30 votes
6 answers
14k views

Should I choose Doctrine 2 or Propel 1.5/1.6, and why? [closed]

I'd like to hear from those who have used Doctrine 2 (or later) and Propel 1.5 (or later). Most comparisons between these two object relational mappers are based on old versions -- Doctrine 1 versus ...
Billy ONeal's user avatar
  • 8,073