2016-07-07 24 views
1

考慮具有3個屬性{id,name,age}的類人員 該id形成爲名稱|| age。 一大家子查詢被Id唯一的工作(在記錄的創建相同的事務)獲取查詢僅在同一交易中的Id列上工作

@Transactional 
public void test(String id,String id2) { 
personService.save(new Person("abc","123")); 
Person person = repository.findByNameAndAge("abc", "23"); //doesn't work in same transaction 
    //however find by Id column works in same transaction works 
    repository.findOne("abc||23") 
    } 

從另一個事務呼叫 repository.findByNameAndAge("abc", "23")返回結果,但在其中創建該記錄是不相同的事務返回任何結果。

這裏的倉庫是

public interface PersonRepository extends GemfireRepository<RecordRevision, String> { 
      List<Person> findByNameAndAge(String name, String age); 

的地區是REPLICATE_PERSISTENT,我使用PDX系列化 調用應該工作,即使在同一個事務,這是任何已知的問題?

回答