gabordemooij / redbean

ORM layer that creates models, config and database on the fly
https://www.redbeanphp.com
2.31k stars 280 forks source link

add store/trash function to oodbbean #850

Closed naftali100 closed 3 years ago

naftali100 commented 3 years ago

please add an option to do something like $bean->store(); instead of R::store($bean); and same for trash $bean->trash();

*edit: i could add a model to the bean, but i'd still have to add the model for all types of beans manually. also, i won't be able to add another model for sepsific bean type

gabordemooij commented 3 years ago

Nope. This is not how RedBeanPHP was designed. Also, you can add this with a super model (extending from Simple_Model) and subclass from there.