Problem with persitant Ebean

Discussion in 'Plugin Development' started by L5D, Jul 28, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    L5D

    Hello, I work on the transition from an old plug to use persistence with Ebean.

    But I have a problem with data loading, I have to load cities, citizens, worlds, spawn points (etc. ..) that are related to each other.
    And when I load the objects with "getDatabase (). Find (Resident.class). FindList ()" and my other classes, I get duplicate objects. I guess it just loading the residents by the city for those responsible, citizens, etc ... And these loads do not recover the residents already loaded.

    To check, I added a static list in Resident to add an instance of a resident created and thus be able to count and compare the number of citizens expected.

    I am looking for how to report to the loading Ebean objects cascade must use the cache for an object already loaded is connected to those who need it then.

    Someone has a solution ? I try to use the ebean cache but it's doesn't work. (@CacheStrategy(readOnly=false,useBeanCache=true,useIndex=UseIndex.YES_IDS)
     
Thread Status:
Not open for further replies.

Share This Page