Parable ORM 0.9.0
Pre-release
Pre-release
0.9.0
Transaction
has been added. Now you can start, commit or roll back a transaction very easily. Simply callTransaction::begin()
,Transaction::commit()
orTransaction::rollback()
.- And to make it even easier, call
Transaction::withTransaction(callable $callable)
to have it all done automatically. Exceptions thrown are rethrown, and the return value of the callable is returned bywithTransaction()
. PropertyTypeDeterminer
has been reworked, and now uses distinctTyper
classes (such asIntegerPropertyTyper
), implementing thePropertyTyper
interface.BooleanPropertyTyper
has been added, which can turn1
and0
intotrue
andfalse
respectively.- Adding custom typers is easy, see
CustomPropertyTyper
in the tests. This way, you can transform from/to any object or value type to what the database can store, without having to care. Database::getLastQuery()
now returns the last query attempted to be performed, rather than the last successful.- Fixed wrong logic in
AbstractRepository::countAll()
andAbstractRepository::countBy()
(that should not have caused issues).