wp-orm icon indicating copy to clipboard operation
wp-orm copied to clipboard

[Unmaintained] Light weight ORM for WordPress

Results 9 wp-orm issues
Sort by recently updated
recently updated
newest added

``` // BaseModel.php public function save() { ... return $this->id; } ``` Why do you return a raw "id" property ? You should return ```$this->{static::get_primary_key()}``` at least in the Insert...

We often use tables that are outside of WP and are sometimes subjected to silliness such as column names with spaces that won't translate directly to PHP class properties. I...

The construction of the OR clause for where_any is trimming one too many characters, thereby rendering the query invalid. Query.php, line 477: ``` $where = substr($where, 0, -5) . ')';...

All the examples are related to a simple table. What about tables with relationships. E.g. An Organisation has many employees: So when I create a Organisation object at design time...

When your Object don't use primary key as 'id'. It will show warning.

Added method to find a specific model by a given meta property value

Method to add meta clause to the search query

https://github.com/brandonwamboldt/wp-orm/blob/17b80105be3ced57a9392b2467f1000ad6c37f7f/src/BaseModel.php#L100 I think this line should be `} elseif ($value instanceof BaseModel) {` because you want to call primary_key() as the flattened value in case a property is a type...