
If you familiar with CodeIgniter, then you have realized by now that you can’t have relationship manager.
Yes, CodeIgniter doesn’t have built-in ORM. But there are several projects such as IgnitedRecord and DataMapper that will help you manage relationship between your models.
In this tutorial, I will introduce you to DataMapper.
From DataMapper Website
DataMapper is an Object Relational Mapper written in PHP for CodeIgniter. It is designed to map your Database tables into easy to work with objects, fully aware of the relationships between each other.
Features
- Everything is an object!
- Easy to setup, easy to use.
- Custom Validation on object properties.
- Lazy Loading (related objects are only loaded upon access).
- Relations and their integrity are automatically managed for you.
- One to One, One to Many, and Many to Many relations fully supported.\
- Select data in the style of Active Record (with or without Method Chaining).
Ok let’s start our journey.
Continue reading »
April 2nd, 2009 |
Del.icio.us |
Digg |
Stumble |
Comments(13)