-->
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: best mapping strategy to use
PostPosted: Wed Dec 14, 2011 7:11 am 
Newbie

Joined: Wed Dec 14, 2011 6:04 am
Posts: 1
hi,
requesting suggestion on best mapping strategy
We have the below class hierarchy.


Class A (abstract)
|
Class B (abstract) extends A Class E extends A Class F extends A
| table E table F
Class C extends B Class D extends B
table C table D

all classes have multiple properties and sets linking to other entities.this was implemented using union-sub-class strategy Now there is a requirement(business) that table C and D can have a record with the same primary key at a given time. In this strategy Hibernate load fails with the error 'multiple records exist with the same primary key', if we try to access a specific record in C or D it gives an error message an object of a different subclass with the same primary key already loaded in session.Have tried using table per subclass with discriminator however finding it difficult to represent the abstract classes A and B in this strategy hibernate seems to try to select on these ignoring abstract="true" and gives an error 'Table Or view Does not Exist' for the abstract classes.
version 3.6


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.