Hi,
1.
Instead of OODB try using RedBean_Finder.
The OODB find() method is just as powerful but more complex, Finder find() is easier and more like the find method in the R-façade.
2.
That's the price of evolution, the API can be a bit funky at times (but it works, it's just the naming).
The instance methods have always been 'more complex' than their façade counterparts, however because people like the façade methods so much (yet preferred instances) I had to re-create some of them.
All functionality is available outside the façade, however sometimes the names of the methods slightly differ.
cheers,
Gabor
On Friday, May 17, 2013 11:21:53 AM UTC+2, Dennis Haarbrink wrote:
Since I generally don't like to use static methods because it makes it hard/near impossible to test, I don't use the R façade. I make sure I have access to a RedBean_OODB instance.
Now I wanted to load some beans but having trouble specifying the conditions. The OODB::find() signature is as follows:
public function find($type, $conditions = array(), $addSQL = null, $all = false)
Where Conditions need to take form:
array(
'PROPERTY' => array( POSSIBLE VALUES... 'John', 'Steve' )
'PROPERTY' => array( POSSIBLE VALUES... )
);
Which makes it VERY restricted.
I want a query like:
select * from table where property <> 'somevalue';
It seems that is not possible with the OODB implementation.
I even tried OODB::find('user', array(1 => 1), 'and property<>"value"');
I basically have two questions:
1. How do I accomplish this without resorting to R ?
2. Why do the two have such different find() implementations?