@NodeEntity
public class Member {
  
  @GraphId
  Long nodeId;
  @Indexed(unique = true, numeric = false)
  private String id;
  private Long facebookUserId;
  @RelatedTo(type = "MY_FB", direction = Direction.BOTH)
  FacebookUser facebookUser;
  @RelatedToVia(type = KNOWS, direction = Direction.BOTH, elementClass = 
Relationship.class)
  Iterable<Relationship> knowsRelationships;
  
  --- constructors and getter/setter.

}

Regards,
Mamta.

On Thursday, June 26, 2014 7:02:16 PM UTC+5:30, Michael Hunger wrote:
>
> What does your entity look like?
>
> Sent from mobile device
>
> Am 26.06.2014 um 14:52 schrieb Mamta Thakur <ghazal...@gmail.com 
> <javascript:>>:
>
> Hi All,
>
> We recently upgraded the Neo4j version to 2.0.3 and SDN to 3.1.0. Data 
> upgrade happened successfully.
> We were able to run some of the APIs successfully where as some gave 
> issues.
>
> <dependency>
> <groupId>org.springframework.data</groupId>
>   <artifactId>spring-data-neo4j</artifactId>
>   <version>3.1.0.RELEASE</version>
> </dependency>
>
> Code:
>  Iterator repoItr =
>         memberRepository.findAllByPropertyValue("id",
>             Long.valueOf(id)).iterator();
>
> Looks like the method is deprecated, but do we have an alternate to this 
> method?
> Tried findAllBySchemaPropertyValue("id", id), but that did not return 
> anything.
>
> Error Stack:
>
> org.springframework.dao.InvalidDataAccessApiUsageException: Can lookup 
> label based property from legacy index
>         at 
> org.springframework.data.neo4j.support.Neo4jTemplate.getIndex(Neo4jTemplate.java:640)
>         at 
> org.springframework.data.neo4j.repository.LegacyIndexSearcher.getIndex(LegacyIndexSearcher.java:40)
>         at 
> org.springframework.data.neo4j.repository.LegacyIndexSearcher.getIndexHits(LegacyIndexSearcher.java:75)
>         at 
> org.springframework.data.neo4j.repository.LegacyIndexSearcher.access$200(LegacyIndexSearcher.java:21)
>         at 
> org.springframework.data.neo4j.repository.LegacyIndexSearcher$3.query(LegacyIndexSearcher.java:132)
>         at 
> org.springframework.data.neo4j.repository.LegacyIndexSearcher.queryResult(LegacyIndexSearcher.java:139)
>         at 
> org.springframework.data.neo4j.repository.LegacyIndexSearcher.findAllByPropertyValue(LegacyIndexSearcher.java:130)
>         at 
> org.springframework.data.neo4j.repository.AbstractGraphRepository.findAllByPropertyValue(AbstractGraphRepository.java:170)
>         at 
> org.springframework.data.neo4j.repository.AbstractGraphRepository.findAllByPropertyValue(AbstractGraphRepository.java:181)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at 
> org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:405)
>         at 
> org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:390)
>         at 
> org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:344)
>         at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>         at 
> org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
>         at 
> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
>         at 
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
>         at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>         at 
> org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155)
>         at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>         at 
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>         at com.sun.proxy.$Proxy53.findAllByPropertyValue(Unknown Source)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at 
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>         at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>         at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>         at 
> org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
>         at 
> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
>         at 
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
>         at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>         at 
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>         at com.sun.proxy.$Proxy60.findAllByPropertyValue(Unknown Source)
>
> Thanks,
> Mamta.
>
> -- 
> 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+un...@googlegroups.com <javascript:>.
> 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