Skip to content

Releases: Vinelab/NeoEloquent

Migration & Schema

22 Feb 19:10
Compare
Choose a tag to compare

Thanks to the efforts put by @qejk this release introduces Migrations and Schema features to NeoEloquent.

Migrations

You may now use the neo4j artisan command namespace to access migration commands:

neo4j:migrate                        Run the database migrations
neo4j:migrate:make                   Create a new migration file
neo4j:migrate:reset                  Rollback all database migrations
neo4j:migrate:refresh                Reset and re-run all migrations
neo4j:migrate:rollback               Rollback the last database migration
Schema

You may create and drop unique and index constraints using the Neo4jSchema facade:

Neo4jSchema::label('User', function(Blueprint $label)
{
    $label->unique('uuid');
    $label->index('email');
});

In addition to some bug fixes and readme enhancements.

Quick Patch

23 Dec 08:30
Compare
Choose a tag to compare

Patched the has() method after a change in Illuminate.

Settled

20 Oct 20:20
Compare
Choose a tag to compare

New

  • Connection authentication. Thanks to @thylo's PR

Fixes

  • Fixed issue #9
  • Fixed issue #11
  • Fixed issue #12
  • Fixed issue #13
  • Fixed issue #14
  • Fixed issue #16
  • Fixed issue #17
  • Fixed issue #18
  • Fixed issue #19
  • Fixed issue #28
  • Fixed an issue where passing null on a value when updating a node doesn't set the field, it just ignores it
  • Fixed an issue where passing false on a value when updating saves it as 0 instead
  • Change the return value of ->update($attributes) from ResultSet to the count of records that were affected by the update
  • Fixed an issue where using boolean or null values in createWith(...) model attributes results in an error, especially with false and null, also true was being converted by PHP to its equivalent int value

SensioLabs Insight Violations

  • Replaced global function declaration with class function
  • Avoided using logical operators
  • Add required use statements
  • Type-hint object params
  • Strict comparison for booleans
  • Fixed unused variables, properties and parameters
  • Removed unused use statements
  • Removed unused commented out code

Bringing Order

15 Jul 14:19
Compare
Choose a tag to compare
  • Added support for ORDER BY statements. See #5
  • Fixed an issue with calling firstOrCreate (adding support for nested wheres).See #8
  • Fixed an issue with calling createWith on recursively related models. See #7
  • Fixed issue #6

1.0.4

28 Jun 21:15
Compare
Choose a tag to compare

Fixed a major issue with Validator's unique rule. Issue #2.

Aggregate

27 Jun 23:16
Compare
Choose a tag to compare
  • Added support for aggregation methods like max min avg sum and more.
  • Added sync() attach() and detach() support for all relations inheriting from HasOneOrMany so they now apply to HasOne HasMany and belongsToMany relationships.
  • Fixed an issue with formatting the query when querying using whereIn whereBetween and whereNull using Id.
  • Fixed an issue where touching models always saves the model even when not needed when using createWith.
  • Enhanced the QueryException message.

Overnight Patch

10 Jun 23:53
Compare
Choose a tag to compare
  • Add whereHas() support to BelongsTo relationship by implementing the required methods and adding them to the RelationInterface to be enforced
  • Fix an issue where querying multiple relations with multiple whereHas statements would consider the query the parent model instead of the related after the first whereHas call

Perfect Cocktail

10 Jun 15:48
Compare
Choose a tag to compare

updating composer requirement to be able to download on stable stability.

Nocturne in PHP Sharp Minor

10 Jun 12:23
Compare
Choose a tag to compare

New in RC 3

  • Added createWith(): A method that allows creating or attaching multiple related models with one hit.
$tagsIds = [1, 2];

Post::createWith(['title' => 'the title', 'body' => 'the body'], [
    'tags'   => $tagsIds,

    'photos' => [
        [
            'url'      => 'http://url',
            'caption'  => '...',
            'metadata' => '...'
        ],
        [
            'url' => 'http://other.url',
            'caption' => 'the bay',
            'metadata' => '...'
        ]
    ],

    'videos' => [
        'title' => 'Boats passing us by',
        'description' => '...'
    ]
]);
  • Added support for insert with multiple records.
Model::insert([

    [
        'key' => 'value',
        'otherkey' => 'othervalue'
    ],
    [
        'key' => 'value',
        'otherkey' => 'othervalue'
    ]

]);

Improvements & Bug Fixes

  • Fixed SoftDeleting issue - requires useing Vinelab\NeoEloquent\Eloquent\SoftDeletingTrait instead of Illuminate\Database\Eloquent\SoftDeletingTrait
  • Fixed the direction of belongsToMany relationships to be INCOMING instead of OUTGOING
  • Fixed an issue where querying parent models after whereHas would query the related model instead of the parent
  • Improved Cypher queries with Ids where they used to be a static _nodeId, modified to be the concatenation of the node identifier and id

Perfect Cocktail

10 Jun 15:50
Compare
Choose a tag to compare

This is it! The first stable release is out! 😸

Improvements

  • createWith to support passing in a Collection like:
Post::createWith(..., ['tags'=>Tag::all()]);
  • Saving related models with createWith to have timestamps
  • hasMany relationship generates the correct relationship label when not provided

Still Missing

  • Firing model events when not working with save() in places like createWith
  • Edges to fire events
  • Support for AND, OR, XOR and NOT operators
  • Support for [x] and [x..y] operators
  • Functional tests for Traversals
  • a cypher() method that allows running a raw Cypher query