Join Jon Peck for an in-depth discussion in this video Introducing the Doctrine 2 object-relational mapper, part of Learning Symfony2 for PHP (2014).
- In this chapter, we're going to be creating…and managing the persistent data storage…for a magazine cataloging system.…Within Symfony, this process isn't quite as simple…as just creating a couple database tables…and writing sequel queries.…Yet, at the same time, the amount of work…that it will take is amazingly low, in comparison.…Symfony comes with a number of powerful tools…and standard structures for interfacing with a database…and describing how data is stored.…One of them, is the Doctrine ORM.…I'm going to describe both the "what" and the "why"…before demonstrating how to use Doctrine.…
Let's start with what an ORM is.…ORM is an acronym for object-relational mapping.…An ORM allows developers to indirectly interact…with databases using objects.…Behind the scenes, data conversions…and transactions are handled automatically,…allowing a developer to focus on writing program logic.…Practically speaking, a developer doesn't have to know…what tables they're using, or even what…relational database management system it's on.…
- Installing Symfony
- Creating a bundle from the console
- Customizing and generating database tables
- Generating controllers
- Creating, editing, and debugging entities
- Displaying and debugging a form
- Rendering content with templates
Skill Level Intermediate
Q: When trying to access the application, I receive an error stating "This script is only accessible from localhost." How can I get around this restriction?
A: The development front controller and configuration scripts are protected by default to only allow access from the localhost. Refer to the video titled “Exploring the Symfony layout” to see how to disable this security.