Uploaded image for project: 'Spring Data Neo4j'
  1. Spring Data Neo4j
  2. DATAGRAPH-326

GraphRepositoryFactory picks up more than just GraphRepository repositories

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: CORE
    • Labels:
      None

      Description

      If you have different types of Spring Data Repositories in the same package, like a JPARepository and a GraphRepository and say one for Spring Data Mongo. Then the GraphRepositoryFactory, if base-package is set to this package, will pick them all up thinking they are all GraphRepositorys.

      Any scan should only pick up GraphRepository interfaces and ignore any other classes in the same package.

      If it does scan others, then in line 86 on GraphRepositoryFactory will get a domain object that isn't a SDN domain object.

      Maybe need to call getRepository method of base class RepositoryFactorySupport in the getTargetRepository method???

      Or maybe it needs to catch this much earlier. Not sure which BeanPostProcessor is used that goes into the base package and searches for repositories.

        Attachments

          Activity

            People

            • Assignee:
              mhunger Michael Hunger
              Reporter:
              bytor99999 Mark Spritzler
              Last updater:
              Nicolas Mervaillie
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: