-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Relationship mapping strategies
PostPosted: Tue Mar 28, 2006 10:24 am 
Beginner
Beginner

Joined: Mon Feb 13, 2006 8:34 pm
Posts: 27
What relationship mapping strategies are available with EJB 3.0 Persistence?
I know that object relationship can be map by embedding objects or using foreign key mapping strateg, but is serialization of objects available?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 28, 2006 11:00 am 
Newbie

Joined: Tue Mar 07, 2006 7:20 am
Posts: 16
What do you need that for?

Do you want @Embedded functionality?

A non-primitive type (e.g. Name) is treated as embedded:

- The @Embedded annotation is not necessary
- Embedded implies that the properties (or fields) of Name are mapped to the columns in the same table as Person


Top
 Profile  
 
 Post subject: Relationships serialization?
PostPosted: Tue Mar 28, 2006 2:28 pm 
Beginner
Beginner

Joined: Mon Feb 13, 2006 8:34 pm
Posts: 27
I know what embeding implies:-), but I need to know e.g. if is possible to serialize all collection in to the single column (this is possible in JDO 2.0).
Actually I need to know if serialization is possible to map any objects relationship (I could'n find it in EJB Specyfication, maybe I missed sth?)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 31, 2006 4:34 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
The best way in hibernate is to use a UsercollectionType.
Otherwise I imagine than @Lob will serialize the collection.

The problem with this collection ids in one column feature is that, joining is either impossible or inefficient.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 31, 2006 4:34 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
plus it breaks all the relational rules

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.