PDO with ATTR_EMULATE_PREPARES = false sends a native PHP bool as an empty
string. MariaDB rejects it on a TINYINT column with "Incorrect integer
value: ''", so every boolean column was unwritable through the ORM:
inserting a model with a bool property always failed.
toDatabaseValue() now maps bool to 1/0. Other scalars, enums, dates and
BigDecimal keep their existing handling.
Covered by TypeCasterDatabaseValueTest.
Attribute-mapped Active Record ORM for MariaDB/MySQL over PDO.
- Attribute-driven metadata: TableName, PrimaryKey, AutoIncrement, Column,
Guarded, Ignore, Required, Enum, Nullable, Length, Precision, Unique,
UniqueGroup, Index, MaxLength.
- Relationship mapping: BelongsTo, HasOne, HasMany, BelongsToMany with
batched eager loading and a 3-level depth limit.
- Orm entry point with fromArray, fromPdo, fromEnv and nested transactions.
- Immutable Query with Cond operators and GroupCond grouping.
- Repository read and write API, pagination, and typed exception hierarchy.
- Declares PHP >=8.3; Mago and PHPStan pin the parser to 8.3.
- MIT license.