dbTalk Databases Forums  

Persistence with Relationship Classes

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


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



Reply
 
Thread Tools Display Modes
  #1  
Old   
Haas
 
Posts: n/a

Default Persistence with Relationship Classes - 06-03-2006 , 10:56 AM






I'm trying persist objects that yours class have relationship, when I
do the comand put an Exception is returned to me:
java.lang.IllegalArgumentException: References to entities are not
allowed: vo.Friend

I had two classes, People and Friend, the relationship is: One People
has one Friend.

How can I do to persist this objects with relationship?


Reply With Quote
  #2  
Old   
mark.hayes (AT) oracle (DOT) com
 
Posts: n/a

Default Re: Persistence with Relationship Classes - 06-05-2006 , 08:27 AM






Hi Haas,

Haas wrote:

Quote:
How can I do to persist this objects with relationship?
Relationships are represented as keys, not as object references. In
other words, one entity contains the key of another entity, not the
instance of another entity.

Please see the example here:

http://www.sleepycat.com/jedocs/java...y.html#example

Mark



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.