dbTalk Databases Forums  

Persistence with one-to-one Relationship Classes

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss Persistence with one-to-one Relationship Classes in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jack.tang
 
Posts: n/a

Default Persistence with one-to-one Relationship Classes - 10-11-2006 , 02:14 PM






Hi list,

I have two class, SimplePrincipal and SimpleUser, their relationship
and java code with annotation list below:

@Persistent
public class SimplePrincipal {
@PrimaryKey
private String name;
......
}

@Entity
public class SimpleUser extends SimplePrincipal {

/**
* The profile properties.
*/
@SecondaryKey(relate=ONE_TO_ONE)
private Map properties;
}

The above code doesnot work since Map is complex object type. So now I
give one fake field as SecondayKey. Any other solutions to handle this?

/Jack


Reply With Quote
  #2  
Old   
mark.hayes@oracle.com
 
Posts: n/a

Default Re: Persistence with one-to-one Relationship Classes - 10-12-2006 , 12:13 PM






Hello Jack,

I posted your question to the Berkeley DB Java Edition discussion forum
and have asked you for more information in that message:

http://forums.oracle.com/forums/thre...hreadID=433192

If you can't use the product, please let me know and I'll duplicate the
information here.

Mark


Reply With Quote
  #3  
Old   
mark.hayes@oracle.com
 
Posts: n/a

Default Re: Persistence with one-to-one Relationship Classes - 10-12-2006 , 12:15 PM



Sorry, I meant "use the product forum" not "use the product".
Mark


Reply With Quote
  #4  
Old   
jack.tang
 
Posts: n/a

Default Re: Persistence with one-to-one Relationship Classes - 10-14-2006 , 01:21 AM




mark.hayes (AT) oracle (DOT) com wrote:
Quote:
Hello Jack,

I posted your question to the Berkeley DB Java Edition discussion forum
and have asked you for more information in that message:

http://forums.oracle.com/forums/thre...hreadID=433192

If you can't use the product, please let me know and I'll duplicate the
information here.

Mark
Hi Mark,

The integrated SimpleUser should own two attributes <name, properties>,
and I just want to retrieve SimpleUser via name(it is unique).

/Jack



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.