CodeIgniter Forums
DataMapper ORM v1.8.0 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: DataMapper ORM v1.8.0 (/showthread.php?tid=37531)



DataMapper ORM v1.8.0 - El Forum - 06-06-2011

[eluser]RS71[/eluser]
I've been thinking about using this but I have a question:

Is the validation supposed to replace CI's or is it to be used with CI's validation lib?


DataMapper ORM v1.8.0 - El Forum - 06-07-2011

[eluser]Benedikt[/eluser]
I don't know if this bug is known (at least it looks to me as a bug):

Code:
$where_cond_1 = array( 'foo' => 'bar', 'abc' => '123' );
$where_cond_2 = array( 'bar' => 'foo', '123' => 'abc' );

$object_a = new Object();

  $object_a->group_start();
    $object_a->where( $where_cond_1 );
  $object_a->group_end();
  $object_a->or_group_start();
    $object_a->where( $where_cond_2 );
  $object_a->group_end();
  $object_a->get();

This will produce a wrong MySQL-Syntax like

Code:
SELECT * FROM objects WHERE ( 'foo' = 'bar' 'abc' = '123' )
OR
WHERE ( 'bar' = 'foo' '123' = 'abc' );

Problem: Connection via "AND" inside the WHERE-clause is missing. I solved the problem by writing each WHERE-condition as

Code:
$object_a->where( 'foo', 'bar');
$object_a->where( 'abc', '123' );

etc. I did something wrong is it a bug?


DataMapper ORM v1.8.0 - El Forum - 06-07-2011

[eluser]WanWizard[/eluser]
You've found a bug, triggered by the combination of the array and the grouping.

I just pushed a fix to bitbucket, you can download the latest here: https://bitbucket.org/wanwizard/datamapper/get/7e37f36f8737.zip


DataMapper ORM v1.8.0 - El Forum - 06-07-2011

[eluser]Benedikt[/eluser]
That was fast Smile

Thanks!


DataMapper ORM v1.8.0 - El Forum - 06-07-2011

[eluser]WanWizard[/eluser]
A new version of Datamapper, v1.8.1., has been released today.

-----------------------------------------------------------------------------------

Please consider this thread closed.

If you have issues with an older version of Datamapper, please upgrade to the latest version before reporting them.



You can find the new thread about the new version here.


DataMapper ORM v1.8.0 - El Forum - 06-21-2011

[eluser]Adam[/eluser]
According to the requirements page "Datamapper is tested with the latest CodeIgniter 2.0". Are these tests available for download anywhere?


DataMapper ORM v1.8.0 - El Forum - 06-21-2011

[eluser]WanWizard[/eluser]
No, not at the moment.

Basically, I currently test using an application that contains most functionality. Far from perfect, but it has a long history, and I haven't had time to wrote a proper unit test for it.

Testing everything time and time again against new reactor versions is time consuming, constantly fixing issues even more so.

Given the rapid structural changes that are being made by the Reactor time, which make core extensions more and more difficult (as a drop-in, and without having to actually extend lots of core classes), I'm not sure Datamapper will ever see a v2.0.


DataMapper ORM v1.8.0 - El Forum - 06-21-2011

[eluser]Flyingbeaver[/eluser]
Just see the new post. Sorry.


DataMapper ORM v1.8.0 - El Forum - 06-24-2011

[eluser]heldrida[/eluser]
[MOVED to new thread]


DataMapper ORM v1.8.0 - El Forum - 08-09-2011

[eluser]valuk[/eluser]
Hi guys I ned your help.

I have problem with setting self relationship. The table have this fields: id, self_id, name.

If self_id isn't set then record (row) is parent. If self_id is set then record is child.
Parent has many children, but every child has only one parent.

Now, i don't know how to generate has_one and has_many arrays.