Skip to content

Releases: oscarotero/simple-crud

5.2.1

03 Dec 13:39
Compare
Choose a tag to compare

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

02 Dec 18:19
Compare
Choose a tag to compare

removed $first argument in RowCollection::filter() and added $strict

5.1.3

03 Nov 16:55
Compare
Choose a tag to compare
  • 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

14 Oct 10:33
Compare
Choose a tag to compare
  • Fixed multiple external relations saving.

5.1.1

24 Sep 10:50
Compare
Choose a tag to compare
  • Fixed Json field when the value is a json string

5.1.0

10 Sep 17:33
Compare
Choose a tag to compare

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

08 Sep 19:42
Compare
Choose a tag to compare

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 and registerProperty to Row and RowCollection
  • More field types: Serialize, Json, Integer, Float, etc
  • etc

4.1.0

06 Aug 18:05
Compare
Choose a tag to compare
  • New sum() query. Example:

    $total = $db->posts->sum()->field('rating')->get();
  • Improved select(), count(), update().

4.0.0

03 Aug 15:35
Compare
Choose a tag to compare

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

02 May 12:22
Compare
Choose a tag to compare
3.1

Implemented attributes to share values across all entities and rows