-->
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.  [ 2 posts ] 
Author Message
 Post subject: Many To Many Association..Unable to meet my req??
PostPosted: Mon Apr 26, 2004 8:27 am 
Beginner
Beginner

Joined: Tue Feb 17, 2004 7:53 am
Posts: 24
Hello,

Pls let me know about the following requirement :

Example : My system contains Collector , Account , Document, Dispute Entities. Collector manages diff accounts and Accounts is a collection of documents. Now a dispute can be raised against a document/account.

There is a junction table DISPUTE_RELATION for this association. DISPUTE_RELATION contains dispute_relation_id, dispute_id, logical_type, logical_key. logical_type is either COLLECTOR, ACCOUNT, DOCUMENT. and logical_key contains the corresponding IDs.

Now when a dispute is created, a record is created in Dispute Table and three records go into DISPUTE_RELATION table. One for Collector , one for account and one for document. Now I have an issue that how to show this kind of association ?

<class name="com.aceva.rms.dispute.Dispute" table="Dispute">
<id name="id" column="id" type="long" length="15" unsaved-value="null">
<generator class="sequence"/>
</id>
<set name="entityMap" table="dispute_relation">
<key column="dispute_id"/>
<many-to-many column="" class="??????"/>
</set>

Issue is there are diff kinds of objects in this association with dispute, i.e collector, account and document. And these objects have no relation ship between them . And I can show only association with only one kind of object in the junction table??

I hope I am clear. Let me know if any doubts.

Please let me know about this as its urgent. I am in the process of rearhitecturing part of my system on hibernate. And this is the most demanding requirement.


Top
 Profile  
 
 Post subject: Help required ..
PostPosted: Tue Apr 27, 2004 4:19 am 
Beginner
Beginner

Joined: Tue Feb 17, 2004 7:53 am
Posts: 24
hey..pls let me know abt this


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.