tempest-framework
tempest-framework copied to clipboard
Model API
Models themselves are simple data objects, but the IsModel trait and Model interface add a bunch of database-specific methods. We need to carefully think on this API before a 1.0 release. I'd rather drop it if we don't like it for 1.0, and only keep Query to Model mapping support. Up for debate.
I think it would be an option to follow a bit what Symfony does and build on the mapper stuff by recommending using repositories, but in Tempest style. That would leave models to be mere PHP objects (unlike Doctrine and Laravel) and in the most basic implementation it can be just a call to map(new Query(...))