Ivan Tcholakov
Ivan Tcholakov
+1 I backported the patch by thanosk within ColorBox 1.4.4, it works for me.
+1 The first method: A scope 'ignore_observers()' should be created and then it should be applied as a condition within the internal method trigger(). This is the easier method, only...
A second thought: A combination of the both ways would be the best. skip_observers() as scope name matches better. Edit: I choose the first method, because it is simpler. Performance...
Somebody interested may make a back-port.
A real usage: I've got a table with user accounts and the corresponding model has the observers 'created_at', 'created_by', 'updated_at', 'updated_by'. Also I have a field 'last_logged_in_at' that stores current...
@jamierumbelow My implementation is on a clone that is getting quite different. Before implementing this feature would you allow minor refactoring? It would be easier if there is a method...
Just a note for me: ``` sh $ git checkout -b skip_observers jamierumbelow/master fatal: Cannot update paths and switch to branch 'skip_observers' at the same time. Did you intend to...
I've reached another solution: https://github.com/ivantcholakov/codeigniter-base-model/commit/4818bfe2c65fd43d16b75db340ca593631339258 It gives a possibility for injecting complex WHERE clauses. I hesitate whether it is beautiful enough.
The initial idea was something like this: ``` $this->load->model('products'); $search_list = $this->products->get_many_by( $this->products->db ->where('out_of_stock', 0) ->group_start() ->like('name', 'sandals') ->or_like('description', 'sandals') ->group_end() ); var_dump($search_list); ``` But I abandoned it.
The best way is by wrapping more DB methods, which I did having in mind that in CodeIgniter 3.0.0 some parameters (mainly $escape) have been added and some parameter default...