Releases: oscarotero/simple-crud
Releases · oscarotero/simple-crud
5.2.1
More flexibility to configure the factories. Now you can get them to configure.
$entityFactory = $db->getEntityFactory();
$fieldFactory = $entityFactory->getFieldFactory();
$queryFactory = $entityFactory->getQueryFactory();
5.2.0
removed $first
argument in RowCollection::filter()
and added $strict
5.1.3
- Assigned de Datetime format to fields with names ending by
[a-z]At
(for example: "createdAt", "publishedAt", "updatedAt", etc). - Asigned Boolean format to fields with names begining by
(is|has)[A-Z]
(for example: "isActive", "hasContent", etc). - Selected views in sqlite databases, instead only tables #3
5.1.2
- Fixed multiple external relations saving.
5.1.1
- Fixed Json field when the value is a json string
5.1.0
Added a second argument to save()
to save external relations automatically. For example:
$post = $db->posts[5];
$post->tags = [1, 2, 5];
$post->comments = [3, 4];
$post->save(false, true);
$tag = $db->tags[2];
$comment = $db->comments[3];
$tag->post_tags->post_id; // [5]
$comment->post_id; //5
5.0.0
New version with a lot of breaking changes:
- Support for many-to-many relations
- Added strict naming conventions
- Instead one factory class, now there's a factory for each class type (entities, queries and fields)
- Removed the row/rowCollection/query functions in the entity.
- Added
registerMethod
andregisterProperty
to Row and RowCollection - More field types: Serialize, Json, Integer, Float, etc
- etc
4.1.0
-
New
sum()
query. Example:$total = $db->posts->sum()->field('rating')->get();
-
Improved select(), count(), update().
4.0.0
New versión with a different API. The most notable changes:
- New class
SimpleCrud\SimpleCrud
to manage the database. Removed the adapters. - New classes
SimpleCrud\Queries\*
to generate queries based in the db type (mysql or sqlite) - Some utilities to handle many-to-many relationship
- Simplified the row and rowcollection classes to reduce overloading
- Removed custom rows and rowCollections. All custom functions are declared in the entity.
- And a lot of changes. See README to know the new API.
3.1
Implemented attributes to share values across all entities and rows