Hi

As Alan mentions, this is a side-effect of both Neo4j's type system and the
JSON format used by the HTTP server. The type system at store level has no
concept of an untyped array and JSON has no way to transmit type
information independent of value, so it's impossible for the server to
determine what type the received array should be stored as. Clark's
suggestion of using a null would be typically used here; your application
can then choose to interpret a null/missing property as an empty list.

Nigel

On 19 October 2016 at 21:02, Clark Richey <clark.ric...@gmail.com> wrote:

> Maybe I'm missing something but why do you want to store an empty array as
> a property? An empty array is logically equivalent to null. Null is
> logically equivalent to not storing a value for hat property. Not storing a
> value for a property is more efficient than writing value = null to disk.
>
> So, shouldn't you just not store a cars property in your example?
>
> Sent from my iPhone
>
> On Oct 19, 2016, at 14:49, Alan Robertson <al...@unix.sh> wrote:
>
> In their data typing system, they need to know the type of the array
> elements.
>
> For example: Is it an array of strings, or ints, or floats?
>
> There is no "array of to-be-determined"...
>
> So, they don't consider it a bug...
>
> In my case either I don't set that attribute to a value when I create the
> object, or I set it to a single empty string as the value - like [""] and
> my code understands what this means.
>
> It definitely makes you have to work harder...
>
>     -- Alan
>
>
> On 10/10/2016 01:02 AM, Red wrote:
>
>
> CREATE (root {name: "foobar", cars: []}) RETURN root
>
> Queries, like above are impossible through rest
>
> https://github.com/philippkueng/node-neo4j/issues/12
> https://github.com/versae/neo4j-rest-client/issues/130
>
> Isn't it a bug?
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to neo4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to neo4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to neo4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to