-->
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.  [ 1 post ] 
Author Message
 Post subject: Embeddable Entity
PostPosted: Fri Mar 20, 2009 5:40 pm 
Newbie

Joined: Sun Jul 06, 2008 7:05 pm
Posts: 6
Hi,

I want to always refer to the IdClass when referencing an entity instead of utilizing its entity class. For various reasons this makes the object nice for serialization and communication.

My first most obvious concern is that I map as an entity the embeddable class that is also the IdClass of the original class. It works but i have to look at this in more detail.

Does anyone have any resources about the mapping of multiple entities to the same table?

Does anyone have any resources about the usage of mapped entities as embeddable classes?

Thanks
-Tim



public class Alpha {
...
@ManyToOne
@JoinColumn(name="beta_id")
public BetaPk getBeta()
...
}

@Entity
@IdClass(BetaPk.class)
@Table(name="beta")
public class Beta


@Embeddable
@Entity
@Table(name="beta")
public class BetaPk implements Serializable


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

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.