ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

DataMapper ORM v1.8.2

November 30, 2011 3:43pm

Subscribe [100]
  • #1 / Nov 30, 2011 3:43pm

    WanWizard

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

  • #2 / Nov 30, 2011 4:54pm

    Hugw

    5 posts

    Ty so much! Great Job.

  • #3 / Nov 30, 2011 5:38pm

    tarciozemel

    82 posts

    Great job! Congrats!

    I’ll test soon 😉

  • #4 / Nov 30, 2011 9:56pm

    Mark Price

    24 posts

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

  • #5 / Dec 01, 2011 12:06am

    endielo

    10 posts

    WanWizard, Thank You Very Much~~~!

  • #6 / Dec 01, 2011 1:37am

    zhlgame

    2 posts

    Thank you!
    Can not wait for a try.

  • #7 / Dec 01, 2011 2:58am

    WanWizard

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

  • #8 / Dec 01, 2011 3:02am

    zhlgame

    2 posts

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

  • #9 / Dec 01, 2011 5:09am

    hopeshenliehuo

    3 posts

    than you, i will test as soos as i can

  • #10 / Dec 01, 2011 8:12am

    tarciozemel

    82 posts

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

    Fatal error: Call 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?

  • #11 / Dec 01, 2011 9:00am

    WanWizard

    4475 posts

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

  • #12 / Dec 01, 2011 10:59am

    tarciozemel

    82 posts

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

    I changed. Now the error is:

    Fatal error: Call to protected method CI_DB_active_record::_reset_select() from context 'DataMapper' in…
  • #13 / Dec 01, 2011 2:01pm

    tarciozemel

    82 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!

  • #14 / Dec 01, 2011 3:29pm

    WanWizard

    4475 posts

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

    I changed. Now the error is:

    Fatal error: Call to protected method CI_DB_active_record::_reset_select() from context 'DataMapper' in…

    Found it. Will fix that too…

  • #15 / Dec 01, 2011 3:31pm

    WanWizard

    4475 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!

    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.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases