front and back-end web development, Leeds, UK


Richard's Blog - Design, coding and life in Japan

Richard

ActiveRecord

Using repositories in Doctrine 2

One feature of Doctrine 2 and other data mapper style ORM's is that rather than each class model invoking itself to make queries in the database (Active Record style), custom queries to the database are handled by a bridge layer that is extends the Entity Manager.

We cannot do any any queries to the DB without going through the Entity Manager, here is the simplest case:

Tags:

Doctrine 2 and why you should use it!

If any of you are used to Hibernate in the Java world you will know what I am talking about. But Doctrine 2 is almost exactly the same as Hibernate.

Tags:

Using :include in Rails ActiveRecord call doesnt create a joins query

I am currently writing an Rails app that uses quite a few database calls. I wanted to cut these calls down so I knew I would need to use the :include option in ActiveRecord. I was expecting from what Ryan Bates mentioned in one of his RailsCasts that a nice join would be created for me in one query.

Tags:

Recent Blog Posts

Syndicate content