Vinelab / NeoEloquent

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

ParameterMissing error when try to set empty array to any property #339

Open iyhunko opened 4 years ago

iyhunko commented 4 years ago

in Connection.php in public function prepareBindings(array $bindings) $bindings with empty array values will be missing in $prepared, thus we will have ParameterMissing exception.

iyhunko commented 4 years ago

Example:

if we try to do this update:

"MATCH (external_socialdata_datasource:`External`:`SocialData`:`DataSource`) WHERE external_socialdata_datasource.uuid = {uuid} SET external_socialdata_datasource.phones = {phones_update}, external_socialdata_datasource.updated_at = {updated_at_update} RETURN count(external_socialdata_datasource), external_socialdata_datasource"
array:3 [
  "uuid" => "a8bf564e-4aaa-4c7a-974f-771a4d284eda"
  "phones_update" => []
  "updated_at_update" => "2020-04-06 11:16:57"
]

we will get this error:

GraphAware\Bolt\Exception\MessageFailureException {#1062
  #statusCode: "Neo.ClientError.Statement.ParameterMissing"
  #message: "Expected parameter(s): phones_update"
stale[bot] commented 3 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.

stale[bot] commented 2 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.

vaix-dungpx commented 1 year ago

Hello, i connect to Neo4j Aura Db that uri is neo4j+s://6397445c.databases.neo4j.io and not working

engsamar commented 4 months ago

@vaix-dungpx did you solve your connection error with Aura Db ?

vaix-dungpx commented 4 months ago

@vaix-dungpx did you solve your connection error with Aura Db ?

Thanh you, it's done. I tested it and it's working fine.