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

findOne() method behaviour

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 2.1.M1
    • Fix Version/s: None
    • Component/s: CORE
    • Labels:
    • Environment:
      kubuntu 12.04 64bit

      Description

      When I use: User user = template.findOne(id,User.class)

      if a an id is provided that doesn't belong to a node representing a user but a to a different class (e.g car) the method returns a not null result.
      More specifically it returns a user objecthaving all its fields filled with null.

      Shouldn't this throw a casting error ? (form car to user?).

      Both User and Car nodes have a property named _type_ (with values my.domain.User and my.domain.Car respectively)

        Attachments

          Activity

            People

            Assignee:
            mhunger Michael Hunger
            Reporter:
            nkpap Nikolaos Papadakis
            Last updater:
            Trevor Marshall
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: