Welcome Guest, Not a member yet? Register   Sign In
DataMapper ORM v1.8.0

[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?

[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?

[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/datamapp...6f8737.zip

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

Thanks!

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

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

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

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

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

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




Theme © iAndrew 2016 - Forum software by © MyBB