Skip to content

Releases: phpfui/ORM

Default Nullable Date and Time Fields fix

03 Apr 15:29
Compare
Choose a tag to compare

Nullable Date and Time fields with a CURRENT default should now correctly default to the current time when inserted or updated.

Limit fields updated on setFrom

25 Mar 19:25
Compare
Choose a tag to compare

The second parameter to setFrom is now an array of fields that will be set. This allows you to limit what fields get updated. The default is to update all fields appearing in the first parameter to setFrom().

This introduces a minor breaking change used for internal purposes and should not affect application code. The old second parameter (bool $loaded = false) is now the third parameter. PHPStan will detect this change if used.

Null related record assignment

21 Mar 01:01
Compare
Choose a tag to compare
  • Set related record id to null if related record is empty and field is nullable. Previously set to zero.

Correct default for migration::run field

26 Feb 15:33
Compare
Choose a tag to compare

Migrations will now run correctly on MySQL and MariaDB

Updated Internals - Rerun \PHPFUI\ORM\Tool\Generate\CRUD

13 Feb 22:14
Compare
Choose a tag to compare

Internal refactor for typed field definitions.

WARNING: You must rerun the \PHPFUI\ORM\Tool\Generate\CRUD class against your database. See scripts/generateCRUD.php for an example. No other changes will be needed.

Fixed support for nullable CURRENT_TIMESTAMP and CURRENT_DATE defaults.

Better support for Virtual fields

29 Jan 15:03
Compare
Choose a tag to compare
  • Virtual fields now support null better.
  • Enums set to null default to 0.
  • Cast will not convert null.

Fix for Enums in setFrom

27 Jan 16:41
Compare
Choose a tag to compare

setFrom method now calls __set for custom setters.

Allow * for addSelect()

16 Jan 04:13
Compare
Choose a tag to compare
  • '*' is a valid field for addSelect()
  • Null defaults to zero when assigning to an Enum

Better field sanitation

06 Jan 22:41
Compare
Choose a tag to compare

Better sanitation for fields to prevent injections attacks on user supplied fields

Null Assignments

25 Nov 14:54
Compare
Choose a tag to compare
  • Detect null assignment to non nullable fields
  • Better support for default float values of 0.0 (requires regen of Definition classes)