scholrly/neo4django — pull request #118 by vistorve (2012-07-10 23:31:52+00:00)
Title: Add a use_string kwarg to ArrayProperty to store data as a token separated string

use_string kwarg when set to True will override default behavior of ArrayProperty
and store array data as a token separated string in neo4j instead of an array.

This is useful for users who interact with their neo4j instance with tools other
than neo4django and so cannot make use of the gremlin magic that neo4django
uses behind the scenes. Neo4j's current REST API does not support
storing empty arrays because it cannot determine the data type from the passed
in JSON.

The user can specify the token to use as the separator as well as the token to
use for escaping the separator with the values themselves. to_neo() will take care
of escaping the separator within the values themselves. The only caveat that this
brings in is that all values become strings as to_neo() does not store type information
along with each value.

Regression tests produced two errors/failures but these are also present in the current
pull from neo4django's master branch.