-->
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: Testing of hibernate
PostPosted: Mon Oct 13, 2008 12:39 pm 
Newbie

Joined: Fri Oct 10, 2008 11:48 am
Posts: 3
Hi guys,

may I have some additional questions about hibernate?

Lets consider the next scenario:

Code:
@Entity
@Inheritance(strategy=InheritanceType.JOINED)
public class Boat implements Serializable { ... }

@Entity
public class Ferry extends Boat { ... }

@Entity
@PrimaryKeyJoinColumn(name="BOAT_ID")
public class AmericaCupClass  extends Boat { ... }



1) In the case of AmericaCupClass entity, is somehow possible to set the parent entity(BOAT)???? I mean, Hibernate doesn't allow you to set BOAT_ID, it throws "Repeated column in mapping for entity: boatId (should be mapped with insert="false" update="false")"

2) Is somehow possible to attach AmericaCupClass entity to an EXISTING instance of Boat? Without using of association? I kinda have a feeling that it's not possible...

Best Regards









[/code]


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.