Results 1 to 2 of 2

Thread: Neo4J: Using spatial-Index in standalone mode

  1. #1

    Default Neo4J: Using spatial-Index in standalone mode

    Hi,

    i am using Spring Data Neo4J in standalone mode, so i cannot use "@Autowired". I want to use spatial abilities of the repository but don't know, how to do that.

    Code:
    public interface OsmAddressRepo extends GraphRepository<OsmAddress>, SpatialRepository<OsmAddress> {
    }
    Of course, i can't create an object of type OsmAddressRepo

    Code:
    GraphRepository<OsmAddress> addressRepo = this.neoTemplate.repositoryFor(OsmAddress.class);
    neoTemplate doesn't return my defined "interface OsmAddressRepo", of course (and not supringsingly). Casting doesn't help, too.

    Is there a way to inform neoTemplat manually about my defined interface? Or is there a way to cast the return of neoTemplate?

    Greetz,
    Markus

    Using: Spring Data Neo4j 2.1.0RC3, neo4j 1.8M07, neo4j-spatial 0.9SNAPSHOT;
    http://static.springsource.org/sprin...erence:spatial

  2. #2
    Join Date
    May 2012
    Posts
    107

    Default

    Markus,

    You should be able to use http://static.springsource.org/sprin...onContext.html , getBean(...) to get a proper wired up repository. I haven't got an example to hand, but have done something similar before.

    Regards,

    Lasse

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •