Vinelab / NeoEloquent

The Neo4j OGM for Laravel
MIT License
633 stars 199 forks source link

Feature: array properties #197

Closed apopiak closed 4 years ago

apopiak commented 7 years ago

@Mulkave @heydavid713 I need array properties for my usage of the OGM.

I'm willing to implement them, but would like your guidance on how to do that in a compatible way (so you'll be able/want to merge my PR). Am I correct that I would need to modify valufy here?

apopiak commented 7 years ago

This line makes no sense to me. If array values are not supported it makes no sense to convert them. The test does not have valid cypher in it, AFAIKT. e.g. this line would mean that I get {someKey: 'foo', 'bar'} if I call prepareEntity with something like [ "someKey" => ["foo", "bar"] ] which is not valid cypher, right?

Mulkave commented 7 years ago

@apopiak true, it is not valid Cypher, though you're looking at the right place. In the case of array parameters it would be better to use placeholders and have the driver replace them. Such as '{someKey: {someValue}}', ['someValue' => ['foo', 'bar']]}' using the bindings array in the builder.

If you need more help with this I'll be happy to support.

apopiak commented 7 years ago

@Mulkave Would you be up for having a call, talking about this? It seems like you have separate code for e.g. insert and update actions which is surprising to me.

Mulkave commented 7 years ago

@apopiak sure thing, please join the Neo4j Slack channel for IM.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.