EllisLab text mark
Advanced Search
1 of 63
1
   
DataMapper ORM v1.8.2
Posted: 30 November 2011 04:43 PM   [ Ignore ]
Avatar
Joined: 2008-11-04
4404 posts

DataMapper ORM 1.8.2

Download the Latest Version Here

  View the change log and the upgrade process
  Having issues? Please look through the Troubleshooting Guide & FAQs
  View the Complete Manual
  Search the Manual
  (Due to the server’s caching configuration, you may need to forcibly refresh your browser to see the changes in the manual.)

DataMapper (DM) 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.

To install DataMapper ORM, the (fairly simple) upgrade process is described here.

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).

You can learn much more from the manual.

———————————————————————————————————

Version 1.8.2:
  * New Features
      o Backported the DataMapper 2.0 bootstrap to get access to core classes in CodeIgniter version 2.0.3 and above.
      o Changed the way watched methods are processed. This allows extensions to replace core methods.
      o Add support for an absolute path for “extensions_path”.
      o Added a all_to_single_array() method to the array extension.
  * Bug Fixes
      o Added a default for nestedsets root field name as described in the documentation.
      o Fixed ignoring model configuration properties with a NULL or FALSE value.
      o Fixed broken trans_status() method.
  * Other Changes
      o Improved the way the available model paths are determined.
      o Several corrections to the documentation.

This version introduces a bootstrap loader that needs to be installed in your index.php file, and will allow DataMapper to access CodeIgniters protected core methods and properties, while keeping CodeIgniters core extension mechanism operational (DataMapper does not introduce MY_ versions of libraries).

Make sure to check out the changelog — you won’t want to skip this update!

————————————————————————————————————————

Bug reports and feature requests:

DataMapper has moved to Github for the development of version 2.0. Please use the issue register / bug tracker on github to report new bugs or for new feature requests. If you do, please include in your description is link to the thread on this forum discussing the issue (if possible), so I have a link between the two and can keep track of all issues.

————————————————————————————————————————

Older Discussions: Version 1.8.1, Version 1.8.0, Version 1.7.1, Version 1.6.2, Version 1.5.4, Version 1.5.3 and older.

Thanks goes to Overzealous, for all he has achieved with DMZ. And to stensi, for providing such an amazing code base to work on.

 Signature 

Me: WanWizard.eu | My company: Exite | Datamapper: DataMapper ORM

 
Posted: 30 November 2011 05:54 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2009-04-11
5 posts

Ty so much! Great Job.

 
Posted: 30 November 2011 06:38 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2008-09-17
90 posts

Great job! Congrats!

I’ll test soon wink

 
Posted: 30 November 2011 10:56 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Joined: 2009-11-15
26 posts

Excellent! I have been eagerly waiting for this. Thanks for all the hard work.

 
Posted: 01 December 2011 01:06 AM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Joined: 2010-10-20
10 posts

WanWizard, Thank You Very Much~~~!

 
Posted: 01 December 2011 02:37 AM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Joined: 2011-11-26
2 posts

Thank you!
Can not wait for a try.

 
Posted: 01 December 2011 03:58 AM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2008-11-04
4404 posts

A bug has surfaced.

If you use validation in DataMapper, and you haven’t loaded the form validation library, DataMapper generates a missing method error on line 1138.

You can work around this by either loading the form validation library yourself (through autoload or manually) or by removing said line:

$this->load->unset_form_validation_class(); 

I’ll try to fix this and update the distribution tonight.

 Signature 

Me: WanWizard.eu | My company: Exite | Datamapper: DataMapper ORM

 
Posted: 01 December 2011 04:02 AM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Joined: 2011-11-26
2 posts

Thank you!
I have removed this code line.
It works.

 
Posted: 01 December 2011 06:09 AM   [ Ignore ]   [ # 8 ]   [ Rating: 0 ]
Joined: 2011-11-24
3 posts

than you, i will test as soos as i can

 Signature 

Aviosoft Player

 
Posted: 01 December 2011 09:12 AM   [ Ignore ]   [ # 9 ]   [ Rating: 0 ]
Avatar
Joined: 2008-09-17
90 posts

I was tryed to upgrade, follow all instructions, but doesn’t work. The error is:

Fatal errorCall to protected method DataMapper::add_model_path() from context 'MY_Controller' in xxx on line xxx 

Obviously, as seen, I’m using the MY_Controller with some common methods and I’m using too the Datamapper::add_model_path():

Datamapper::add_model_path
(
 array
 (
  
APPPATH 'modules/company',
  
APPPATH 'modules/location',
  
APPPATH 'modules/user'
 
)
); 

What might be happening?

 
Posted: 01 December 2011 10:00 AM   [ Ignore ]   [ # 10 ]   [ Rating: 0 ]
Avatar
Joined: 2008-11-04
4404 posts

Just change the protected to public. I’ll fix this tonight.

 Signature 

Me: WanWizard.eu | My company: Exite | Datamapper: DataMapper ORM

 
Posted: 01 December 2011 11:59 AM   [ Ignore ]   [ # 11 ]   [ Rating: 0 ]
Avatar
Joined: 2008-09-17
90 posts
WanWizard - 01 December 2011 10:00 AM

Just change the protected to public. I’ll fix this tonight.

I changed. Now the error is:

Fatal errorCall to protected method CI_DB_active_record::_reset_select() from context 'DataMapper' in... 
 
Posted: 01 December 2011 03:01 PM   [ Ignore ]   [ # 12 ]   [ Rating: 0 ]
Avatar
Joined: 2008-09-17
90 posts

Array Extension performance

I have a doubt about to use extensions, in the case, the array extension. For example, I have a relative complex ->get() to work with this results.

If I use ->all_to_array(), all the after programming will take less resources of the server or is the same thing? And if the ->get() is more simple? If exists any performance variations, depends of the complexity of the generated query?

Regards!

 
Posted: 01 December 2011 04:29 PM   [ Ignore ]   [ # 13 ]   [ Rating: 0 ]
Avatar
Joined: 2008-11-04
4404 posts
tarciozemel - 01 December 2011 11:59 AM
WanWizard - 01 December 2011 10:00 AM

Just change the protected to public. I’ll fix this tonight.

I changed. Now the error is:

Fatal errorCall to protected method CI_DB_active_record::_reset_select() from context 'DataMapper' in... 

Found it. Will fix that too…

 Signature 

Me: WanWizard.eu | My company: Exite | Datamapper: DataMapper ORM

 
Posted: 01 December 2011 04:31 PM   [ Ignore ]   [ # 14 ]   [ Rating: 0 ]
Avatar
Joined: 2008-11-04
4404 posts
tarciozemel - 01 December 2011 03:01 PM

Array Extension performance

I have a doubt about to use extensions, in the case, the array extension. For example, I have a relative complex ->get() to work with this results.

If I use ->all_to_array(), all the after programming will take less resources of the server or is the same thing? And if the ->get() is more simple? If exists any performance variations, depends of the complexity of the generated query?

Regards!

All the array method does is iterate over the object, and copy the object properties to an array.

It has no relation whatsoever with the complexity of your query. If your query runs for 10 minutes, but only produces one result, all_to_array() will return an array with one element in a few milliseconds.

 Signature 

Me: WanWizard.eu | My company: Exite | Datamapper: DataMapper ORM

 
Posted: 01 December 2011 04:43 PM   [ Ignore ]   [ # 15 ]   [ Rating: 0 ]
Avatar
Joined: 2008-11-04
4404 posts

I have updated the online version of the 1.8.2 zipfiles, with fixes for the errors above, and one reported on the issue tracker (related to loading the form validation library).

 Signature 

Me: WanWizard.eu | My company: Exite | Datamapper: DataMapper ORM

 
1 of 63
1