tareq1988 / wp-eloquent

Eloquent ORM for WordPress
https://tareq.co/2015/05/eloquent-orm-in-wordpress/
566 stars 134 forks source link

Unable to select then update model #82

Open matheval opened 3 years ago

matheval commented 3 years ago

When i select model by id and then save, exception error occurs

use WeDevs\ORM\WP\Woo_Abcd_Connection_Model as Abcd_Connection;
$hihi = Abcd_Connection::find(1);
$hihi->name = 'foo';
$hihi->save();`

image

kevinjavitz commented 2 years ago

I got the exact same error, it seems save() is not supported meaning this project is only for queries?

kevinjavitz commented 2 years ago

this fixes it and saving works, I just updated his sample model from the readme: https://github.com/tareq1988/wp-eloquent/pull/83