Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Persistence in PHP with Doctrine ORM
  • Table Of Contents Toc
  • Feedback & Rating feedback
Persistence in PHP with Doctrine ORM

Persistence in PHP with Doctrine ORM

By : Kevin Dunglas
5 (5)
close
close
Persistence in PHP with Doctrine ORM

Persistence in PHP with Doctrine ORM

5 (5)
By: Kevin Dunglas

Overview of this book

Doctrine 2 has become the most popular modern persistence system for PHP. It can either be used as a standalone system or can be distributed with Symfony 2, and it also integrates very well with popular frameworks. It allows you to easily retrieve PHP object graphs, provides a powerful object-oriented query language called DQL, a database schema generator tool, and supports database migration. It is efficient, abstracts popular DBMS, and supports PHP 5.3 features. Doctrine is a must-have for modern PHP applications. Persistence in PHP with Doctrine ORM is a practical, hands-on guide that describes the full creation process of a web application powered by Doctrine. Core features of the ORM are explained in depth and illustrated by useful, explicit, and reusable code samples. Persistence in PHP with Doctrine ORM explains everything you need to know to get started with Doctrine in a clear and detailed manner. From installing the ORM through Composer to mastering advanced features such as native queries, this book is a full overview of the power of Doctrine. You will also learn a bunch of mapping annotations, create associations, and generate database schemas from PHP classes. You will also see how to write data fixtures, create custom entity repositories, and issue advanced DQL queries. Finally it will teach you to play with inheritance, write native queries, and use built-in lifecycle events. If you want to use a powerful persistence system for your PHP application, Persistence in PHP with Doctrine ORM is the book you.
Table of Contents (12 chapters)
close
close

Chapter 3. Associations

In the previous chapter, we learned how to use Doctrine annotations to add mapping information to an entity class. We used code and database schema generators provided by Doctrine command-line tools, and we created a minimalist blog software that uses an EntityManager class to create, update, delete, and display blog posts.

In the third chapter, we will learn how to handle associations between entities through the following topics:

  • Getting started with the Doctrine associations

  • Understanding the @ManyToOne and @OneToMany annotations with the comment system

  • Understanding the @ManyToMany annotation with tags

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Persistence in PHP with Doctrine ORM
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon