Hi,
Im still using 1.5.4 that’s why I ask my question here:
I have a controller where I instantiate my DataMapper model:
/* Bike-Object */
$b = new Bike();
$b->where('key', $key);
$b->where('color', 'red');
$b->get();
The model looks like this:
class Bike extends DataMapper {
var $table = 'cti_bikes';
public function Bike () {
parent::DataMapper();
}
}
When I run
$b->count();
it return 2 even there is only 1 database entry.
When I run
$b->check_last_query();
the database query is shown twice.
It seems I am doing something basically wrong as it seems to affect all my datamapper models. The Constructor is always called twice.
Any idea what could be wrong?
Thanks for help.
