Questions tagged [codeigniter-datamapper]

An ORM library for CodeIgniter that builds on CodeIgniter's existing ActiveRecord library. Despite its name, it does not use the DataMapper pattern, but is instead an implementation of the ActiveRecord pattern.

DataMapper is an Object-Relational Mapper that builds on ActiveRecord. Data is loaded from database tables into objects, and relationships can be managed through simple, easy-to-read functions.

DataMapper ORM adds several important features to original DataMapper library, further enhancing it's usage, usually without requiring any code changes.

DataMapper offers these 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).

Datamapper User Guide: http://datamapper.wanwizard.eu/
CodeIgniter wiki page: http://codeigniter.com/wiki/DataMapper_ORM/
Current release discussions : http://codeigniter.com/forums/viewthread/190990/

248 questions
-1
votes
1 answer

Error Number: 1096 Error Number: 1096 No tables

class model_trans_gc extends CI_Model{ function trans_gc_add() { $add=array( 'trans_gc_date' => $this->input->post('trans_gc_date'), 'trans_gc_no' => $this->input->post('trans_gc_no'), …
-1
votes
2 answers

Where condition on third table field in many to many relationship using datamapper

I have 3 tables- users(id,name,dob) books(id,title,author) issuedbooks(id,book_id,student_id,issue_date) The relationship between user and book is many to many resulting in third table issuedbooks. My models are- class student extends DataMapper{ …
Prateek Shukla
  • 593
  • 2
  • 6
  • 24
-1
votes
1 answer

More than 1 object type per table

I have developed a scheduling application where I have one table and dm class called "users" where i so far have stored all information about all users in the system. All users are internal users. Now I need to implement login functionality for…
jonixj
  • 407
  • 3
  • 11
-1
votes
1 answer

Datamapper ORM save data in join table

I am currently working an application with Code Igniter and Datamapper ORM and I am trying to save data in the database. I have two tables which have a many to many relationship between eachother. For example: ShoeDesigns and ShoePieces. I would…
koramaiku
  • 348
  • 2
  • 5
  • 22
-1
votes
2 answers

codeigniter active record class

this is my normal mysql command $query = $this->db->query("SELECT `house_details`.`houses_id` , `house_details`.`house_dis` , `house_details`.`house_type` , `house_details`.`area` , `house_details`.`cost` , `house_details`.`user_id` ,…
Shourob Datta
  • 1,276
  • 13
  • 25
-2
votes
1 answer

Join in datamapper in codeigniter

How to Create INNER JOIN query in datamapper in codeigniter? Country : id(int) | Name(varchar) User : id(int) | name(varchar) | country_id(int) Required Query SELECT * FROM User u INNER JOIN Country c ON(c.id = u.country_id) WHERE u.name LIKE %abcd%
Tomas
  • 388
  • 3
  • 9
  • 32
-2
votes
1 answer

Datamapper php relations

Well, I have 3 tables: sorty with fields id, name, fStart, fEnd bol with fields id, fol, and bol_sorty with id, bol_id, sorty_id When I add a new register to sorty, it must add to bol the number of items from fstart to fEnd. I know how to create a…
-2
votes
3 answers

Can i use php inside a form element like this?

I'm doing a campaign project in which the admin can reserve some seats using admin panel. When he wants to edit it,previously selected seats should highlight. This is what i've done for achieving this if ($mode == 'EDIT') { …
Bhuvan Rikka
  • 2,655
  • 1
  • 14
  • 27
1 2 3
16
17