Skip to content

Releases: phpfui/ORM

Better Validator::unique logic

08 May 16:01

Choose a tag to compare

  • Correctly reports the value of the field that is not unique when using additional column constraints
  • Cases the table class correctly for additional column constraints

Enum support in Condition

26 Apr 03:01

Choose a tag to compare

  • Enums can now be used as values in Condition objects without having to use MyEnum::MY_VALUE->value
    • Example: $condition = new \PHPFUI\ORM\Condition('field', MyEnum::MY_VALUE);
  • Added Table::validateFromTable method to perform record validation before calling updateFromTable

Type Safe Enum support

16 Apr 02:02

Choose a tag to compare

Better default JOINs

29 Mar 15:38

Choose a tag to compare

  • Table::addJoin() now has better defaults
    • If $on is empty, then the following defaults are tried:
      • Join on the primary key of the join table if it exists on both tables
      • If field does not exist on both tables, then use the primary key of the main table
    • If $on is a non-empty string, use as the join field
    • Use \PHPFUI\ORM\Condition for complex joins
  • Table::update() now supports joins
  • Literal class is now supported for Condition

Table::find() is now specific to the table

05 Mar 20:14

Choose a tag to compare

  • find() adds the table name for where condition
  • Support for PHPUnit 11

Better @property tags for related records

28 Feb 03:22

Choose a tag to compare

Auto generated related record @Property tags where wrong for ID suffixes that were not 2 characters.

Set ManyToMany and MorphMany

23 Feb 23:29

Choose a tag to compare

  • Added support for assigning a ManyToMany relationship with a simple assignment statement.
  • Support for MorphMany relationships like Eloquent supports
  • Updated actions to V4

Construct Record from DataObject should not be empty

13 Jan 02:47

Choose a tag to compare

Also updated documentation on Condition

insertOrUpdate default values

23 Dec 00:24

Choose a tag to compare

Fixed updating fields with default values on update section of insertOrUpdate

Stricter Types

11 Dec 23:53

Choose a tag to compare

  • IN and NOTIN operator classes now require an array
  • Table::updateFromTable only update provided fields