-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Laravel's Validator #2
Comments
Hi @qejk, thanks for the report. Will be working on the validation/aggregate issue through the weekend and push it as soon as done. Plans for Schema building are on the list of upcoming features which will be out soon as well. |
@Mulkave Thanks! I would go with I'm half way in doing Illuminate-Schema like Facade, but afais Atm I have:
And using Laravel's Schema look-alike client code:
And migrations with dedicated folder Dunno on what stage your up on this feature, would you like contribution or at a sneak peek prehaps? (even for 'raw' copy paste - I dont mind) tests could be done via However do you have any kind of idea how to handle migrations (db versioning) per say to make them actually... um, useful in neo4j? I'm trying to think few scenarios that could happen when migrating data in neo4j, but many of them are limited by neo itself (like renaming anything in schema) - and how to handle them as nodes (since indexes/unique constraints can be handled easily w/o versioning). Scenario: Changing label from X to Z
Other scenarios: |
Definitely would be great to have them contributed if you already proceeded with the implementation, I already started setting up for the index/dropIndex methods myself 😛 but since you've worked them out then let's collaborate further, I was thinking of running Cypher straight instead of using the indexing methods provided by neo4jphp. As for migrations, honestly I wouldn't go so far with them especially with a dynamic db such as Neo4j, though changing labels is a valid scenario that might occur, one thing we can do about it with something like:
or changing relationship labels:
But then we'll have to be careful for |
f412bb8 unfortunately the issue with Validator remains, now it prevents from creating any node at all after 1 successful saved model. |
Weird, can you please provide more details about the code you are trying so that I can track it down ? |
Sure, here is simplified to few lines version like most people do validation with Laravel (tried on fresh install even , 4.2):
It will create first node for Bob, but after that validation will fail. |
Yep got it, sorry for the hassle it turned out to be a bug where the aggregation was not taking the collected query into account. Will fix it asap. |
Hello, thanks for creating this package!
I'm trying to make it work with default Laravel's validator.
Setting up rules for Model like:
Will of course accomplish nothing, but after setting up 'table' as name of node's label:
Will actually generate a Cypher query:
But because by default Laravel's validator (from:
Illuminate\Validation\DatabasePresenceVerifier::getCount()
) is trying to run:there is a problem with default
aggregate()
from extendedIlluminate\Database\Query\Builder
:The problem seems to be with:
That should return array:
And instead of it returns:
And at this late moment I've stopped researching...
Thanks!
Are you planning to add Illuminate-Schema like migration support for indexes, unique constraints on labels and CREATE UNIQUE?
http://docs.neo4j.org/chunked/stable/cypher-schema.html
http://docs.neo4j.org/chunked/stable/query-create-unique.html
The text was updated successfully, but these errors were encountered: