This is something I don't understand. Your entire idea here is based on using XML to define information about a model. Yet, you still need to define a class to contain the properties? If that is so the XML or class is merely a extra step. Why not just have one generic data container since the information about the model can be obtained through its XML configuration - correct? Needing to define a XML file and class doesn't sit well with me.
Code:
class User {
Public $followers = array(); // collection of User objects
Public $following = array(); // collection of User objects
Public $twits = array(); // collection of Twit objects
Public $username;
}
I was also looking at the documentation and it doesn't seem as if there is a whole lot of control over grouping, having, where, sort and limit clauses. Is there support for things such as having, limit,sort and group or would it be more or less a hack? Is there support for grouped conditions - (t1.a = 1 AND t1.b=2) OR (t1.status = 0)? Lastly is there recursive join support or is the select generation one dimensional? Is all data binded or is it embedded?
I also believe in a simple interface.
PHP Code:
$users = $dorm->getUserCollection("user_id > :id", array("id" => 2));
I would prefer placing the comparison operator directly in the array as the key.
PHP Code:
$users = $dorm->getUserCollection(array('id>' => 2));
The former just seems like a extra step.
PHP Code:
$bob = new User();
$bob->username = "bob";
$john = new User();
$john->username = "john";
$tim = new User();
$tim->username = "tim";
Is it possible in this instance to insert these items all in the same query?
PHP Code:
$save = new DormSave();
$save->add($john)->add($tim)->add($bob);
$save->save();
or must one always act on individual entities?
Bookmarks