Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Persist only selected fields of a persistent object

Neelkamal-OracleOct 4 2016 — edited Oct 5 2016

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

@Entity

public class BerkeleyEntity {

    @PrimaryKey

    private String configPath;

    private ConfigObject xmlData;

}

@Persistent

public 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

This post has been answered by Greybird-Oracle on Oct 5 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 2 2016
Added on Oct 4 2016
2 comments
618 views