Releases: phpfui/ORM
Releases · phpfui/ORM
Better default JOINs
- 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
- If $on is empty, then the following defaults are tried:
- Table::update() now supports joins
- Literal class is now supported for Condition
Table::find() is now specific to the table
- find() adds the table name for where condition
- Support for PHPUnit 11
Better @property tags for related records
Auto generated related record @Property tags where wrong for ID suffixes that were not 2 characters.
Set ManyToMany and MorphMany
- 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
Also updated documentation on Condition
insertOrUpdate default values
Fixed updating fields with default values on update section of insertOrUpdate
Stricter Types
- IN and NOTIN operator classes now require an array
- Table::updateFromTable only update provided fields
PHP 8.3
Explain support
- Added \PHPFUI\ORM\Table::getExplainRows to return the database dependent query information
- SQL statements now have better pretty printing for human readability.
insertOrUpdate does not zero primary key on update
- insertOrUpdate no longer sets the primary key of the updated record to zero.
- Better RelatedRecord class to accommodate non-standard naming conventions with the ability to pass the field to use.