Releases: phpfui/ORM
Releases · phpfui/ORM
Construct Record from DataObject
- Provide an easy way to convert an untyped DataObject to a typed Record
Not (!) operator for validators
- Use the Not (!) operator in front of any validation rule to negate it. Includes new translations for ! operator.
- Cursors now use a zero based index to match arrays (instead of one based)
- PHPStan Level 6
OR operator on validations
OR Operator for Validations
You can validate a field if any one of the validators passes. Use the vertical bar (|) to separate validators. If one of the validators passes, then the the field is valid.
String primary keys are not type changed
String primary keys are not type changed due to MySQL not caring about types.
getPrimaryKeys returns simple array
getPrimaryKeys() now returns a simple array containing just the primary key fields and not an associative array index by field names.
Definition namespace will need to be regenerated.
Clear parameters between validations
- Invalid parameters could be passed to subsequent validators
- Phone number cleaning allows spaces as valid characters
Better Primary Key support
This release requires models to be regenerated.
- Better Primary Key support
- Better find logic for strings
- Improved duplicate row deletion for migrations
save() method and updated docs
V1.1.10 Code style
Table::insertOrIgnore
V1.1.9 Table::insertOrIgnore
Delete Children records on delete
- Children defined using the Children class will automatically be deleted when the parent is deleted.
- This is a recursive call so the entire child tree will be deleted.
- Set $deleteChildren static field to false in the Record to disable.