Forum Stats

  • 3,768,738 Users
  • 2,252,843 Discussions
  • 7,874,704 Comments

Discussions

Persist only selected fields of a persistent object

Neelkamal-Oracle
Neelkamal-Oracle Member Posts: 15
edited Oct 5, 2016 3:44PM in Berkeley DB Java Edition

Hello,

I want to know if there is an option to persist only selected fields of a persistent object. I have my entity and persistent class something like below

@Entitypublic class BerkeleyEntity {    @PrimaryKey    private String configPath;    private ConfigObject xmlData;}

@Persistentpublic class ConfigObject{    private Map<String, ClassA> firstMap;    protected Map<Long, ClassB> secondMap;    private Map<Long, ClassC> thirdMap; }

Currently, I have all the 3 classes (  ClassA, ClassB, ClassC ) declared as persistent ( I am using BD JE )

Is there a way for me to tell berkeley db to persist only ClassA, ClassB and not ClassC ?

The original object is a more complex and 4-5 levels deep so checking if I can do something keeping the ConfigObject intact

Thanks,

Neel

ComClassmonFieldIs

Best Answer

Answers

This discussion has been closed.