Skip to content

v1.9.1

Choose a tag to compare

@mathsgod mathsgod released this 24 Jun 07:19
d592a8d

Bug Fixes

  • fix(Model): support composite primary keys with auto-increment columns
    • Preserve explicitly-set primary-key values instead of overwriting them with column defaults.
    • Temporarily narrow primaryKeyColumn to the auto-increment column during INSERT so Laminas RowGateway can refresh the inserted row correctly.
    • Restore the full composite primary key after INSERT and rebuild primaryKeyData for non-auto-increment PK columns.
    • Fix the "no primary key" default-value fallback to consider all PK columns.

Tests

  • Added CompositePrimaryKeyTest with create/update/delete scenarios for PRIMARY KEY (id, tenant_id) tables.

Verification

OK (121 tests, 432 assertions)