Part of the EllisLab Network
   
3 of 42
3
DataMapper ORM v1.8.2
Posted: 03 December 2011 02:34 PM   [ Ignore ]   [ # 21 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  4108
Joined  11-04-2008

@azheem,

I’ve updated the example application, and added some quick fixes to the htmlform extension to make it work.

The 1.8.2 download has been updated with these fixes, download it again if you want to try the example.

 Signature 

WanWizard.eu | Modular CI, an HMVC solution | DataMapper ORM

Profile
 
 
Posted: 04 December 2011 09:38 PM   [ Ignore ]   [ # 22 ]  
Summer Student
Avatar
Total Posts:  8
Joined  05-13-2010

Hi i found some error after try to using example application on codeigniter 2.1.0 and datamapper 1.8.2

Fatal errorCall to undefined method CI_DB_mysql_driver::dm_call_method() in C:\wamp\www\examples\application\libraries\datamapper.php on line 1113 
Profile
 
 
Posted: 05 December 2011 03:49 AM   [ Ignore ]   [ # 23 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  4108
Joined  11-04-2008

Then you haven’t read the docs, and didn’t install the bootstrap in your index.php file.

This is new since 1.8.2, see http://datamapper.wanwizard.eu/pages/installation.html

 Signature 

WanWizard.eu | Modular CI, an HMVC solution | DataMapper ORM

Profile
 
 
Posted: 05 December 2011 08:49 PM   [ Ignore ]   [ # 24 ]  
Summer Student
Total Posts:  1
Joined  12-05-2011

Same error occur:
Fatal error: Call to undefined method CI_DB_mysql_driver::dm_call_method() in C:\wamp\www\examples\application\libraries\datamapper.php on line 1113

Any work fine version with full packaged code base include CI 2.1.0 and DataMapper1.8.2 ?
We will be greatly appreciated!

Profile
 
 
Posted: 05 December 2011 10:10 PM   [ Ignore ]   [ # 25 ]  
Summer Student
Total Posts:  20
Joined  11-15-2009

You need to add

/*
 * --------------------------------------------------------------------
 * LOAD THE DATAMAPPER BOOTSTRAP FILE
 * -------------------------------------------------------------------- *
 */
require_once APPPATH.'third_party/datamapper/bootstrap.php'

directly before the

/*
 * --------------------------------------------------------------------
 * LOAD THE BOOTSTRAP FILE
 * --------------------------------------------------------------------
 *
 * And away we go...
 *
 */
require_once BASEPATH.'core/CodeIgniter.php'

in your index.php

Profile
 
 
Posted: 06 December 2011 04:56 PM   [ Ignore ]   [ # 26 ]  
Summer Student
Total Posts:  10
Joined  12-06-2011

I thought i would just throw in the example that was in the zip when i downloaded DataMapper 1.8.2, and check out an working example to learn how to use it…. but… now I’ve tried for 3-4 hours to get it working -.-’ to find out what I’ve done wrong. Deleted everything, downloaded everything again, and copied it all ind again, many many many times. Looked through every single line in all config files, but i really can’t figure out what’s wrong -.-’

It creates the databases right, and fills some data in it, and then…
1. When I try to go forward, this shows up in the URL

hxxp://localhost/codeigniter_testing/index.php/admin/<?= site_url(‘admin/init’) ?>

annoying, but easy to jump to /admin/init.


2. On the init site where i create a user, this shows up om top of the page:

A PHP Error was encountered

Severity: Warning

Message: Invalid argument supplied for foreach()

Filename: datamapper/htmlform.php

Line Number: 52

tried filling in the form anyways.


3. Then I get a page only with this text:

Fatal error: Uncaught exception ‘Exception’ with message ‘Unable to call the method “from_array” on the class User’ in C:\wamp\www\codeigniter_testing\application\libraries\datamapper.php:1277 Stack trace: #0 [internal function]: DataMapper->__call(‘from_array’, Array) #1 C:\wamp\www\codeigniter_testing\application\controllers\admin.php(166): User->from_array(Array, Array) #2 [internal function]: Admin->init(‘save’) #3 C:\wamp\www\codeigniter_testing\system\core\CodeIgniter.php(359): call_user_func_array(Array, Array) #4 C:\wamp\www\codeigniter_testing\index.php(203): require_once(‘C:\wamp\www\cod…’) #5 {main} thrown in C:\wamp\www\codeigniter_testing\application\libraries\datamapper.php on line 1277

 

This is really really pissing me off xD I thought I was about to learn about the DataMapper, but ended up using 3-4 hours trying to get the example working, without luck -.-’ Really hope someone can help me xD

Profile
 
 
Posted: 06 December 2011 05:30 PM   [ Ignore ]   [ # 27 ]  
Summer Student
Total Posts:  16
Joined  07-15-2011

GREAT JOB WanWizard! I have been waiting for this update.

I follow the install tutorial and it worked out of the box with no issues, and we have a decent size system.

One question tho, I know CI 2.1 now has a PDO driver. Does ORM works with PDO? If that is the case, how? I tried just changing the driver to ‘pdo’. in the ci database.php config file.

But I get this error message

Uncaught exception ‘PDOException’ with message ‘invalid data source name’ in ...

 

Profile
 
 
Posted: 06 December 2011 06:50 PM   [ Ignore ]   [ # 28 ]  
Summer Student
Avatar
Total Posts:  8
Joined  05-13-2010
WanWizard - 05 December 2011 03:49 AM

Then you haven’t read the docs, and didn’t install the bootstrap in your index.php file.

This is new since 1.8.2, see http://datamapper.wanwizard.eu/pages/installation.html

thank’s works for me. Just some advice, maybe you should update the offline documentation. :D

Profile
 
 
Posted: 06 December 2011 06:53 PM   [ Ignore ]   [ # 29 ]  
Summer Student
Avatar
Total Posts:  8
Joined  05-13-2010

Can I combine this plugin with ionAuth? I see the structure of database table seems same. any suggestion where I’m start

Profile
 
 
Posted: 07 December 2011 02:51 AM   [ Ignore ]   [ # 30 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  4108
Joined  11-04-2008

@Martin Dilling,

When did you download? Download it again, I’ve updated the example application a few days ago, to make it work with CI 2+, and I also removed all short tags.

 Signature 

WanWizard.eu | Modular CI, an HMVC solution | DataMapper ORM

Profile
 
 
   
3 of 42
3